mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 15:24:35 +01:00
opt.: cancel sftp mission
This commit is contained in:
@@ -24,6 +24,8 @@ class PathWithPrefix {
|
||||
_path = pathJoin(_path, newPath);
|
||||
}
|
||||
|
||||
bool get canBack => path != '$_prefixPath/';
|
||||
|
||||
bool undo() {
|
||||
if (_prePath == null || _path == _prePath) {
|
||||
return false;
|
||||
|
||||
@@ -94,7 +94,7 @@ Future<void> _download(
|
||||
return;
|
||||
}
|
||||
// Read 10m each time
|
||||
const defaultChunkSize = 1024 * 1024 * 10;
|
||||
const defaultChunkSize = 1024 * 1024;
|
||||
final chunkSize = size > defaultChunkSize ? defaultChunkSize : size;
|
||||
mainSendPort.send(size);
|
||||
mainSendPort.send(SftpWorkerStatus.downloading);
|
||||
|
||||
Reference in New Issue
Block a user