mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 07:14:28 +01:00
修复路径在windos下读取不到的问题 (#630)
* 修复路径在windos下读取不到的问题 * opt: `local.dart` fmt --------- Co-authored-by: Noo6 <72285529+No06@users.noreply.github.com>
This commit is contained in:
@@ -65,6 +65,10 @@ class _LocalFilePageState extends State<LocalFilePage>
|
|||||||
final path = await Pfs.pickFilePath();
|
final path = await Pfs.pickFilePath();
|
||||||
if (path == null) return;
|
if (path == null) return;
|
||||||
final name = path.getFileName() ?? 'imported';
|
final name = path.getFileName() ?? 'imported';
|
||||||
|
final destinationDir = Directory(_path.path);
|
||||||
|
if (!await destinationDir.exists()) {
|
||||||
|
await destinationDir.create(recursive: true);
|
||||||
|
}
|
||||||
await File(path).copy(_path.path.joinPath(name));
|
await File(path).copy(_path.path.joinPath(name));
|
||||||
setState(() {});
|
setState(() {});
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user