Various fixes [stage]

This commit is contained in:
crschnick
2025-12-23 20:20:52 +00:00
parent bbd32e6ff5
commit 488d5505ff
4 changed files with 13 additions and 4 deletions
@@ -62,7 +62,7 @@ public final class BrowserFileSystemTabModel extends BrowserStoreSessionTab<File
private final Property<Duration> progressRemaining = new SimpleObjectProperty<>();
private final FailableFunction<DataStoreEntryRef<FileSystemStore>, FileSystem, Exception> fileSystemFactory;
private final StringProperty fileSystemNameSuffix = new SimpleStringProperty();
private FileSystem fileSystem;
private WrapperFileSystem fileSystem;
private BrowserFileSystemSavedState savedState;
public BrowserFileSystemTabModel(
@@ -10,6 +10,7 @@ import io.xpipe.app.prefs.AppPrefs;
import io.xpipe.app.process.OsFileSystem;
import io.xpipe.app.process.ShellTemp;
import io.xpipe.app.storage.DataStorage;
import io.xpipe.app.util.BooleanScope;
import io.xpipe.app.util.DesktopHelper;
import io.xpipe.app.util.ThreadHelper;
@@ -142,7 +143,7 @@ public class BrowserTransferModel {
return;
}
try {
try (var ignored = new BooleanScope(itemModel.getBusy()).exclusive().start()) {
transferring.setValue(true);
var op = new BrowserFileTransferOperation(
BrowserLocalFileSystem.getLocalFileEntry(TEMP),
@@ -1,6 +1,7 @@
package io.xpipe.app.ext;
import io.xpipe.app.process.ShellControl;
import io.xpipe.core.FailableConsumer;
import io.xpipe.core.FilePath;
import lombok.Getter;
@@ -13,7 +14,6 @@ import java.util.Optional;
import java.util.function.Supplier;
import java.util.stream.Stream;
@Getter
public class WrapperFileSystem implements FileSystem {
private final FileSystem fs;
@@ -24,6 +24,14 @@ public class WrapperFileSystem implements FileSystem {
this.runningCheck = () -> fs.isRunning();
}
public void withFileSystem(FailableConsumer<FileSystem, Exception> consumer) throws Exception {
if (!runningCheck.get()) {
return;
}
consumer.accept(fs);
}
@Override
public boolean writeInstantIfPossible(FileSystem sourceFs, FilePath sourceFile, FilePath targetFile)
throws Exception {
+1 -1
View File
@@ -1 +1 @@
20.0-10
20.0-11