mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-11-25 00:50:31 +00:00
Improve shell connection validation
This commit is contained in:
parent
c511a72187
commit
1e10c595e4
4 changed files with 7 additions and 10 deletions
|
@ -9,6 +9,7 @@ import io.xpipe.app.storage.DataStorage;
|
|||
import io.xpipe.app.util.CustomComboBoxBuilder;
|
||||
import io.xpipe.app.util.XPipeDaemon;
|
||||
import io.xpipe.core.store.DataStore;
|
||||
import io.xpipe.core.store.LeafShellStore;
|
||||
import io.xpipe.core.store.ShellStore;
|
||||
import javafx.beans.property.Property;
|
||||
import javafx.beans.property.SimpleStringProperty;
|
||||
|
@ -104,7 +105,7 @@ public class DataStoreChoiceComp<T extends DataStore> extends SimpleComp {
|
|||
continue;
|
||||
}
|
||||
|
||||
if (!(mode == Mode.ENVIRONMENT) && !((ShellStore) s).canHaveSubs()) {
|
||||
if (!(mode == Mode.ENVIRONMENT) && s instanceof LeafShellStore) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
package io.xpipe.core.store;
|
||||
|
||||
public interface LeafShellStore extends DataStore {
|
||||
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
package io.xpipe.core.store;
|
||||
|
||||
public interface LeafStore extends DataStore {
|
||||
|
||||
}
|
|
@ -17,10 +17,6 @@ public interface ShellStore extends DataStore, StatefulDataStore, LaunchableStor
|
|||
return s instanceof LocalStore;
|
||||
}
|
||||
|
||||
default boolean canHaveSubs() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
default FileSystem createFileSystem() {
|
||||
return new ConnectionFileSystem(create(), this);
|
||||
|
|
Loading…
Reference in a new issue