#84 fix: sftp upload

This commit is contained in:
lollipopkit
2023-08-03 13:42:30 +08:00
parent 43d3e576e2
commit 0260444ca0
4 changed files with 22 additions and 22 deletions

View File

@@ -126,8 +126,8 @@ Future<void> _upload(
mainSendPort.send(SftpWorkerStatus.sshConnectted);
final localPath = req.localPath;
final remotePath =
req.remotePath + (getFileName(localPath) ?? 'srvbox_sftp_upload');
final fileName = getFileName(localPath) ?? 'srvbox_sftp_upload';
final remotePath = '${req.remotePath}/$fileName';
final local = File(localPath);
if (!await local.exists()) {
mainSendPort.send(Exception('local file not exists'));