mirror of
https://github.com/xpipe-io/xpipe.git
synced 2026-05-04 03:40:32 +00:00
Various fixes [stage]
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user