fix mac can't change video directory
Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
parent
5d6ee18392
commit
fc99a288de
2 changed files with 56 additions and 11 deletions
|
|
@ -381,8 +381,13 @@ class _GeneralState extends State<_General> {
|
|||
),
|
||||
ElevatedButton(
|
||||
onPressed: () async {
|
||||
String? initialDirectory;
|
||||
if (await Directory.fromUri(Uri.directory(dir))
|
||||
.exists()) {
|
||||
initialDirectory = dir;
|
||||
}
|
||||
String? selectedDirectory = await FilePicker.platform
|
||||
.getDirectoryPath(initialDirectory: dir);
|
||||
.getDirectoryPath(initialDirectory: initialDirectory);
|
||||
if (selectedDirectory != null) {
|
||||
await bind.mainSetOption(
|
||||
key: 'video-save-directory',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue