Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The initialDirectory parameter of getDirectoryPath does not support POSIX-style paths #1508

Open
1 of 4 tasks
twinkles-twinstar opened this issue May 10, 2024 · 1 comment
Labels
new issue An issue that hasn't yet been seen from the maintainer stale

Comments

@twinkles-twinstar
Copy link
Contributor

Describe the bug
When using the getDirectoryPath API, if the initialDirectory parameter is set to a POSIX-style path (/path/to/file), the app will crash. When a Windows-style path is set (\path\to\file), the app will run normally.
However, both pickFiles and saveFile APIs support the use of POSIX-style paths, only getDirectoryPath does not allow it.
On Windows platforms, should file_picker internally convert initialDirectory to Windows-style?

Platform

  • Android
  • iOS
  • Web
  • Desktop

Platform OS version
Windows 11 23H2

How are you picking?

FilePicker.platform.pickFiles(initialDirectory: 'C:/'); // ok
FilePicker.platform.getDirectoryPath(initialDirectory: 'C:/'); // crash
FilePicker.platform.getDirectoryPath(initialDirectory: 'C:\\'); // ok

Flutter Version details
v3.19.6, all ok.

@twinkles-twinstar twinkles-twinstar added the new issue An issue that hasn't yet been seen from the maintainer label May 10, 2024
Copy link

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

@github-actions github-actions bot added the stale label May 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new issue An issue that hasn't yet been seen from the maintainer stale
Projects
None yet
Development

No branches or pull requests

1 participant