mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-11-21 23:20:23 +00:00
Rework working directory handling
This commit is contained in:
parent
346855826e
commit
ea7114178f
3 changed files with 3 additions and 5 deletions
|
@ -45,7 +45,6 @@ public final class OpenFileSystemModel {
|
|||
private FileSystem fileSystem;
|
||||
private OpenFileSystemSavedState savedState;
|
||||
private OpenFileSystemCache cache;
|
||||
private int customScriptsStartIndex;
|
||||
|
||||
public OpenFileSystemModel(BrowserModel browserModel, DataStoreEntryRef<? extends FileSystemStore> entry) {
|
||||
this.browserModel = browserModel;
|
||||
|
@ -391,10 +390,7 @@ public final class OpenFileSystemModel {
|
|||
BooleanScope.execute(busy, () -> {
|
||||
var fs = entry.getStore().createFileSystem();
|
||||
if (fs.getShell().isPresent()) {
|
||||
this.customScriptsStartIndex =
|
||||
fs.getShell().get().getInitCommands().size();
|
||||
ProcessControlProvider.get().withDefaultScripts(fs.getShell().get());
|
||||
|
||||
fs.getShell().get().onKill(() -> {
|
||||
browserModel.closeFileSystemAsync(this);
|
||||
});
|
||||
|
|
|
@ -17,7 +17,7 @@ public class LaunchExchangeImpl extends LaunchExchange
|
|||
var store = getStoreEntryById(msg.getId(), false);
|
||||
if (store.getStore() instanceof LaunchableStore s) {
|
||||
var command = s.prepareLaunchCommand()
|
||||
.prepareTerminalOpen(TerminalInitScriptConfig.ofName(store.getName()), null);
|
||||
.prepareTerminalOpen(TerminalInitScriptConfig.ofName(store.getName()), sc -> null);
|
||||
return Response.builder().command(split(command)).build();
|
||||
}
|
||||
|
||||
|
|
|
@ -22,6 +22,8 @@ public interface ShellControl extends ProcessControl {
|
|||
|
||||
List<UUID> getExitUuids();
|
||||
|
||||
void setWorkingDirectory(FailableFunction<ShellControl, String, Exception> workingDirectory);
|
||||
|
||||
Optional<ShellStore> getSourceStore();
|
||||
|
||||
ShellControl withSourceStore(ShellStore store);
|
||||
|
|
Loading…
Reference in a new issue