Improve shell connection validation

This commit is contained in:
crschnick 2023-04-26 14:19:50 +00:00
parent c511a72187
commit 1e10c595e4
4 changed files with 7 additions and 10 deletions

View file

@ -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;
}

View file

@ -0,0 +1,5 @@
package io.xpipe.core.store;
public interface LeafShellStore extends DataStore {
}

View file

@ -1,5 +0,0 @@
package io.xpipe.core.store;
public interface LeafStore extends DataStore {
}

View file

@ -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);