mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-03-12 09:27:01 +00:00
patch swb directory selection on windows
had paths with mixed usage of / and \ closes https://github.com/cypherstack/stack_wallet/issues/829
This commit is contained in:
parent
d1780aa82e
commit
91037cc5a6
1 changed files with 8 additions and 5 deletions
|
@ -82,17 +82,20 @@ class SWBFileSystem {
|
|||
}
|
||||
|
||||
Future<void> pickDir(BuildContext context) async {
|
||||
final String? path;
|
||||
final String? chosenPath;
|
||||
if (Platform.isIOS) {
|
||||
path = startPath?.path;
|
||||
chosenPath = startPath?.path;
|
||||
} else {
|
||||
path = await FilePicker.platform.getDirectoryPath(
|
||||
final String path = Platform.isWindows
|
||||
? startPath!.path.replaceAll("/", "\\")
|
||||
: startPath!.path;
|
||||
chosenPath = await FilePicker.platform.getDirectoryPath(
|
||||
dialogTitle: "Choose Backup location",
|
||||
initialDirectory: startPath!.path,
|
||||
initialDirectory: path,
|
||||
lockParentWindow: true,
|
||||
);
|
||||
}
|
||||
dirPath = path;
|
||||
dirPath = chosenPath;
|
||||
}
|
||||
|
||||
Future<void> openFile(BuildContext context) async {
|
||||
|
|
Loading…
Reference in a new issue