Skip to content

Commit

Permalink
修复路径在windos下读取不到的问题 (#630)
Browse files Browse the repository at this point in the history
* 修复路径在windos下读取不到的问题

* opt: `local.dart` fmt

---------

Co-authored-by: Noo6 <72285529+No06@users.noreply.github.com>
  • Loading branch information
fei1025 and No06 authored Nov 14, 2024
1 parent d706886 commit 046f2c0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/view/page/storage/local.dart
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ class _LocalFilePageState extends State<LocalFilePage>
final path = await Pfs.pickFilePath();
if (path == null) return;
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));
setState(() {});
},
Expand Down

0 comments on commit 046f2c0

Please sign in to comment.