diff --git a/app/src/main/java/io/xpipe/app/browser/BrowserComp.java b/app/src/main/java/io/xpipe/app/browser/BrowserComp.java index aeff930fb..cfd0c20af 100644 --- a/app/src/main/java/io/xpipe/app/browser/BrowserComp.java +++ b/app/src/main/java/io/xpipe/app/browser/BrowserComp.java @@ -268,7 +268,7 @@ public class BrowserComp extends SimpleComp { PlatformThread.sync(model.getBusy()))); tab.setGraphic(label); - new FancyTooltipAugment<>(new SimpleStringProperty(model.getName())).augment(label); + new FancyTooltipAugment<>(new SimpleStringProperty(model.getId() != null ? model.getId().toString() : null)).augment(label); GrowAugment.create(true, false).augment(new SimpleCompStructure<>(label)); tab.setContent(new OpenFileSystemComp(model).createSimple()); tab.setText(model.getName()); diff --git a/app/src/main/java/io/xpipe/app/browser/OpenFileSystemModel.java b/app/src/main/java/io/xpipe/app/browser/OpenFileSystemModel.java index d3e6700b7..83b7eb961 100644 --- a/app/src/main/java/io/xpipe/app/browser/OpenFileSystemModel.java +++ b/app/src/main/java/io/xpipe/app/browser/OpenFileSystemModel.java @@ -9,6 +9,7 @@ import io.xpipe.app.util.ThreadHelper; import io.xpipe.core.impl.FileNames; import io.xpipe.core.process.ShellControl; import io.xpipe.core.process.ShellDialects; +import io.xpipe.core.source.DataStoreId; import io.xpipe.core.store.*; import javafx.beans.binding.Bindings; import javafx.beans.property.*; @@ -39,12 +40,14 @@ public final class OpenFileSystemModel { private final Property overlay = new SimpleObjectProperty<>(); private final BooleanProperty inOverview = new SimpleBooleanProperty(); private final String name; + private final DataStoreId id; private boolean local; public OpenFileSystemModel(String name, BrowserModel browserModel, FileSystemStore store) { this.browserModel = browserModel; this.store = store; this.name = name != null ? name : DataStorage.get().getStoreEntry(store).getName(); + this.id = name != null ? null : DataStorage.get().getId(DataStorage.get().getStoreEntry(store)); this.inOverview.bind(Bindings.createBooleanBinding( () -> { return currentPath.get() == null; @@ -124,6 +127,10 @@ public final class OpenFileSystemModel { return Optional.empty(); } + if (fileSystem == null) { + return Optional.empty(); + } + // Fix common issues with paths var adjustedPath = FileSystemHelper.adjustPath(this, path); if (!Objects.equals(path, adjustedPath)) {