mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-18 15:54:35 +01:00
fix: sftp upload (#175)
This commit is contained in:
@@ -144,18 +144,15 @@ class _SftpPageState extends State<SftpPage> with AfterLayoutMixin {
|
||||
if (path == null) {
|
||||
return;
|
||||
}
|
||||
final remotePath = _status.path?.path;
|
||||
if (remotePath == null) {
|
||||
final remoteDir = _status.path?.path;
|
||||
if (remoteDir == null) {
|
||||
context.showSnackBar('remote path is null');
|
||||
return;
|
||||
}
|
||||
final remotePath = '$remoteDir/${path.split('/').last}';
|
||||
Loggers.app.info('SFTP upload local: $path, remote: $remotePath');
|
||||
Pros.sftp.add(
|
||||
SftpReq(
|
||||
widget.spi,
|
||||
'$remotePath/${path.split('/').last}',
|
||||
path,
|
||||
SftpReqType.upload,
|
||||
),
|
||||
SftpReq(widget.spi, remotePath, path, SftpReqType.upload),
|
||||
);
|
||||
},
|
||||
icon: const Icon(Icons.upload_file));
|
||||
|
||||
Reference in New Issue
Block a user