miguelpruivo/flutter_file_picker

Issues with FilePicker.platform.getDirectoryPath() Dialog

Closed this issue · 2 comments

First of all, thanks for this great library. Using the native file/folder picker is excellent. I am using the library for a MacOS application and need to get the path of a selected folder. I 100% accept that the issues described below are due to some mistake I made, and I am happy to try any suggestion you might have to help me fix the problem.

Describe the bug
I used the code below to show the MacOS folder picker and capture the folder:

String? selectedDirectory = await FilePicker.platform.getDirectoryPath();

There are three problems (and please let me know if I should create one issue for each).

  1. When the folder picker is displayed, the Favourites tab on the left-hand side doesn't show the current user home link but one called Data. It has the same "home" icon but it's called Data.

  2. If I select Documents from the favourites tab, it doesn't display any file or subfolder. It works for other folders, like Downloads or Desktop for example, but not for Documents

  3. When the folder is selected by clicking on the Choose button, the resulting path contains the full MacOS path, including the Volumes folder and the Volume name. In my case, if I select the Downloads folder, it returns the path: /Volumes/Macintosh HD/Users/demagomes/Downloads.

Platform

  • Android
  • iOS
  • Web
  • [ X] Desktop

Platform OS version
What version did it happen?

macOS Sonoma - Version 14.3 (23D56)

How are you picking?

String? selectedDirectory = await FilePicker.platform.getDirectoryPath();

Details to reproduce the issue

  1. Open the getDirectoryPath dialogue box/folder picker and check the favourites tab on the left.
  2. Click on Documents in the left-hand side Favorites tab. when the file is opened.

Error Log
Please, post the full console log of your issue, if applicable.

Screenshots and/or video
image

image

Flutter Version details

`[✓] Flutter (Channel stable, 3.19.0, on macOS 14.3 23D56 darwin-arm64, locale en-GB)
• Flutter version 3.19.0 on channel stable at /Users/ademar/dev/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision bae5e49bc2 (5 days ago), 2024-02-13 17:46:18 -0800
• Engine revision 04817c99c9
• Dart version 3.3.0
• DevTools version 2.31.1

[!] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
• Android SDK at /Users/ademar/Library/Android/sdk
• Platform android-33, build-tools 33.0.2
• ANDROID_HOME = /Users/ademar/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 17.0.7+0-17.0.7b1000.6-10550314)
! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses

[✓] Xcode - develop for iOS and macOS (Xcode 15.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 15C65
• CocoaPods version 1.13.0

[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2023.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 17.0.7+0-17.0.7b1000.6-10550314)

[✓] VS Code (version 1.86.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.82.0

[✓] Connected device (3 available)
• sdk gphone64 arm64 (mobile) • emulator-5554 • android-arm64 • Android 13 (API 33) (emulator)
• macOS (desktop) • macos • darwin-arm64 • macOS 14.3 23D56 darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome 121.0.6167.184

[✓] Network resources
• All expected network resources are available.

! Doctor found issues in 1 category.`

Additional context
Add any other context about the problem here.

This issue is stale because it has been open for 14 days with no activity.

This issue was closed because it has been inactive for 14 days since being marked as stale.