mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-11-21 15:10:23 +00:00
Fix progress being wrong in some cases
This commit is contained in:
parent
d60fff969b
commit
bda50dba72
2 changed files with 3 additions and 3 deletions
|
@ -152,14 +152,13 @@ public class BrowserTransferModel {
|
|||
this.name = name;
|
||||
this.fileEntry = fileEntry;
|
||||
this.localFile = localFile;
|
||||
this.progress =
|
||||
new SimpleObjectProperty<>(BrowserTransferProgress.empty(fileEntry.getName(), fileEntry.getSize()));
|
||||
this.progress = new SimpleObjectProperty<>();
|
||||
}
|
||||
|
||||
public ObservableBooleanValue downloadFinished() {
|
||||
return Bindings.createBooleanBinding(
|
||||
() -> {
|
||||
return progress.getValue().done();
|
||||
return progress.getValue() != null && progress.getValue().done();
|
||||
},
|
||||
progress);
|
||||
}
|
||||
|
|
|
@ -335,6 +335,7 @@ public class FileSystemHelper {
|
|||
throw ex;
|
||||
}
|
||||
|
||||
progress.accept(BrowserTransferProgress.finished(sourceFile.getName(), transferred.get()));
|
||||
Exception exception = null;
|
||||
try {
|
||||
inputStream.close();
|
||||
|
|
Loading…
Reference in a new issue