mirror of
https://github.com/xpipe-io/xpipe.git
synced 2026-04-22 23:49:09 -04:00
Script order fixes [release]
This commit is contained in:
@@ -40,6 +40,7 @@ public final class OpenFileSystemModel {
|
||||
private final String name;
|
||||
private final String tooltip;
|
||||
private boolean local;
|
||||
private int customScriptsStartIndex;
|
||||
|
||||
public OpenFileSystemModel(BrowserModel browserModel, DataStoreEntryRef<? extends FileSystemStore> entry) {
|
||||
this.browserModel = browserModel;
|
||||
@@ -364,6 +365,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.open();
|
||||
@@ -400,7 +402,7 @@ public final class OpenFileSystemModel {
|
||||
var snippet = directory != null ? new SimpleScriptSnippet(connection.getShellDialect().getCdCommand(directory),
|
||||
ScriptSnippet.ExecutionType.BOTH) : null;
|
||||
if (snippet != null) {
|
||||
connection.withInitSnippet(snippet);
|
||||
connection.getInitCommands().add(customScriptsStartIndex,snippet);
|
||||
}
|
||||
|
||||
try {
|
||||
@@ -410,7 +412,7 @@ public final class OpenFileSystemModel {
|
||||
// Restart connection as we will have to start it anyway, so we speed it up by doing it preemptively
|
||||
connection.start();
|
||||
} finally {
|
||||
connection.removeInitSnippet(snippet);
|
||||
connection.getInitCommands().remove(snippet);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -157,8 +157,6 @@ public interface ShellControl extends ProcessControl {
|
||||
|
||||
ShellControl withInitSnippet(ScriptSnippet snippet);
|
||||
|
||||
ShellControl removeInitSnippet(ScriptSnippet snippet);
|
||||
|
||||
ShellControl additionalTimeout(int ms);
|
||||
|
||||
FailableSupplier<SecretValue> getElevationPassword();
|
||||
|
||||
1
dist/changelogs/1.7.8.md
vendored
1
dist/changelogs/1.7.8.md
vendored
@@ -6,6 +6,7 @@
|
||||
- More startup performance improvements
|
||||
- Fix dialog window order sometimes being wrong and shown behind main window
|
||||
- Fix macOS Terminal.app sometimes not launching connection due to a race condition
|
||||
- Many other small miscellaneous fixes and improvements
|
||||
|
||||
## Previous changes in 1.7
|
||||
|
||||
|
||||
Reference in New Issue
Block a user