Skip to content

Commit 8a3caf5

Browse files
getDirectoryPath only works on Linux and macOS. Windows is missing currently.
Signed-off-by: huynguyennovem <huynguyennovem@gmail.com>
1 parent 83751b7 commit 8a3caf5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/ui/server/server_widget.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ class _ServerWidgetState extends State<ServerWidget> {
330330
final isOldDirExisted = await _pickedDir.value.exists();
331331
if(isOldDirExisted) {
332332
String? result = await FilePicker.platform.getDirectoryPath(
333-
initialDirectory: _pickedDir.value.path,
333+
initialDirectory: (Platform.isMacOS || Platform.isLinux) ? _pickedDir.value.path : null,
334334
);
335335
if (result != null && result.isNotEmpty) {
336336
_fileDirectoryTextController.text = result;

0 commit comments

Comments
 (0)