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

Closed
1 of 4 tasks
twinstar6980 opened this issue May 10, 2024 · 2 comments
Closed
1 of 4 tasks
Labels
new issue An issue that hasn't yet been seen from the maintainer stale

Comments

@twinstar6980
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.

@twinstar6980 twinstar6980 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
Copy link

github-actions bot commented Jun 1, 2024

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

@github-actions github-actions bot closed this as completed Jun 1, 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