mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2026-02-21 15:44:30 +01:00
fix: uploaded file's path on windows (#484)
This commit is contained in:
@@ -360,9 +360,10 @@ ${GithubIds.participants.map((e) => '[$e](${e.url})').join(' ')}
|
||||
void _goAuth() {
|
||||
if (Stores.setting.useBioAuth.fetch()) {
|
||||
if (BioAuthPage.route.isAlreadyIn) return;
|
||||
BioAuthPage.route.go(context, args: BioAuthPageArgs(
|
||||
onAuthSuccess: () => _shouldAuth = false,
|
||||
));
|
||||
BioAuthPage.route.go(
|
||||
context,
|
||||
args: BioAuthPageArgs(onAuthSuccess: () => _shouldAuth = false),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import 'dart:async';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:dartssh2/dartssh2.dart';
|
||||
import 'package:fl_lib/fl_lib.dart';
|
||||
@@ -212,7 +213,8 @@ class _SftpPageState extends State<SftpPage> with AfterLayoutMixin {
|
||||
context.showSnackBar('remote path is null');
|
||||
return;
|
||||
}
|
||||
final remotePath = '$remoteDir/${path.split('/').last}';
|
||||
final fileName = path.split(Platform.pathSeparator).lastOrNull;
|
||||
final remotePath = '$remoteDir/$fileName';
|
||||
Loggers.app.info('SFTP upload local: $path, remote: $remotePath');
|
||||
Pros.sftp.add(
|
||||
SftpReq(widget.spi, remotePath, path, SftpReqType.upload),
|
||||
|
||||
Reference in New Issue
Block a user