Small browser fixes

This commit is contained in:
crschnick 2024-10-06 00:15:08 +00:00
parent 8c6333beb9
commit f13eac1c75
4 changed files with 7 additions and 5 deletions

View file

@ -16,6 +16,7 @@ import com.fasterxml.jackson.databind.node.ObjectNode;
import lombok.SneakyThrows;
import lombok.Value;
import java.util.ArrayList;
import java.util.List;
@Value
@ -54,7 +55,7 @@ public class BrowserSavedStateImpl implements BrowserSavedState {
}
@Override
public void save() {
public synchronized void save() {
AppCache.update("browser-state", this);
}

View file

@ -85,7 +85,6 @@ public class FileSystemHelper {
var resolved = shell.get()
.getShellDialect()
.resolveDirectory(shell.get(), path)
.withWorkingDirectory(model.getCurrentPath().get())
.readStdoutOrThrow();
if (!FileNames.isAbsolute(resolved)) {

View file

@ -539,11 +539,11 @@ public final class OpenFileSystemModel extends BrowserSessionTab<FileSystemStore
}
public void backSync(int i) throws Exception {
cdSyncWithoutCheck(history.back(i));
cdSync(history.back(i));
}
public void forthSync(int i) throws Exception {
cdSyncWithoutCheck(history.forth(i));
cdSync(history.forth(i));
}
@Getter

View file

@ -148,7 +148,9 @@ public class ConnectionFileSystem implements FileSystem {
@Override
public void directoryAccessible(String file) throws Exception {
shellControl.executeSimpleCommand(shellControl.getShellDialect().getCdCommand(file));
var current = shellControl.executeSimpleStringCommand(shellControl.getShellDialect().getPrintWorkingDirectoryCommand());
shellControl.command(shellControl.getShellDialect().getCdCommand(file));
shellControl.command(shellControl.getShellDialect().getCdCommand(current));
}
@Override