mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-18 15:54:35 +01:00
fix: uploaded file's path on windows (#484)
This commit is contained in:
@@ -2,6 +2,6 @@
|
||||
|
||||
class BuildData {
|
||||
static const String name = "ServerBox";
|
||||
static const int build = 1025;
|
||||
static const int script = 53;
|
||||
static const int build = 1026;
|
||||
static const int script = 54;
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ abstract final class GithubIds {
|
||||
'azkadev',
|
||||
'kalashnikov',
|
||||
'calvinweb',
|
||||
'No06',
|
||||
'QazCetelic',
|
||||
'RainSunMe',
|
||||
'FrancXPT',
|
||||
@@ -20,6 +21,7 @@ abstract final class GithubIds {
|
||||
'jaychoubaby',
|
||||
'fecture',
|
||||
'Tao173',
|
||||
'Jasonzhu1207',
|
||||
'QingAnLe',
|
||||
'wxdjs',
|
||||
'Aeorq',
|
||||
@@ -72,7 +74,6 @@ abstract final class GithubIds {
|
||||
'pgs666',
|
||||
'FHU-yezi',
|
||||
'ZRY233',
|
||||
'Jasonzhu1207',
|
||||
'sakuraanzu',
|
||||
'licaon-kter',
|
||||
'77160860',
|
||||
|
||||
@@ -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