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
FilePicker.platform.getDirectoryPath()
seems to be moving the original directory to tmp
directory [IOS]
#1440
Comments
same here. any update on the issue? |
This issue is stale because it has been open for 14 days with no activity. |
The FilePicker works fine on Android but on iOS it crashes my app with no permission to access "tmp", whether I want to pick an internal directory or an iCloud. iOS 15.3.1 Error log after picking a folder "Test" in the internal directory structure:
Why is it even trying to move the "Test" directory? I just picked it as a target to save a file into at a later step, nothing else... |
any updated here ? I met same issue :( |
very frustrating this issue is seemingly ignored. this library is basically the only way to access files/folders with flutter |
Same here, any solutions? @miguelpruivo |
I tested some older versions of this library and it seems to yield the same issue, perhaps there has been a breaking change in newer iOS versions? |
I'm trying on ios 16 (physical device) and experiencing it |
Same here, we need a fix please. |
This issue is stale because it has been open for 14 days with no activity. |
Bump |
This issue is stale because it has been open for 7 days with no activity. |
Bumped |
What's the status of this? Haven't experienced any issue in the meantime. Does this only happen on iOS 17.0? I'm not sure if I correctly understood the issue, it doesn't pick the path, is that it? |
@miguelpruivo The issue is present on iOS 15 and newer, not Android. Picking any directory results in the missing permissions for "tmp" error message for me (as seen in my error log above), not sure about what others get. |
I guess I'll have to try to replicate in order to fix it or some issue a PR. Any reproducible example or steps to? |
Simply calling |
For me on real devices the issue is reproducible. Works fine for simulator. |
But what is exactly the issue? |
@miguelpruivo selecting the directory crashes the app and throws the error that I pasted above. |
hey @miguelpruivo, sorry for the late replay. When invoking However, on iOS, due to the limitations you've outlined in your FAQ, one must copy the file or directory to a temporary directory for access. An issue arises with This concern is addressed in the issue that I've opened. Edit: This making me wonder if we was able to move the original folder why we are copying the file in first place? |
This issue is stale because it has been open for 7 days with no activity. |
Bump |
This issue is stale because it has been open for 7 days with no activity. |
Bump |
This issue is stale because it has been open for 7 days with no activity. |
Bump |
This issue is stale because it has been open for 7 days with no activity. |
bump |
This issue is stale because it has been open for 7 days with no activity. |
bump |
@miguelpruivo
I think problem is that it's trying to move the directory, I did not find a way to add permissions to tmp, everything points that it's already should be granted. |
Also experiencing this |
This issue is stale because it has been open for 7 days with no activity. |
bump |
Describe the bug
It seems like the
FilePicker.platform.getDirectoryPath()
will move the original directory instead of copying it to tmp/cache directory.Platform
Platform OS version
IOS 17.2
How are you picking?
Details to reproduce the issue
Try to use
FilePicker.platform.getDirectoryPath()
on any directory.Error Log
N/A
Screenshots and/or video
Screen.Recording.2024-01-29.at.10.16.31.AM-1.mov
Flutter Version details
Additional context
When invoking
FilePicker.platform.getDirectoryPath();
on Android, it successfully returns the actual path of any selected directory.However, on iOS, due to the limitations you've outlined in your FAQ, one must copy the file or directory to a temporary directory for access.
An issue arises with
FilePicker.platform.getDirectoryPath();
on iOS, where it moves the directory instead of copying it, contrary to the expected behavior. As a result, the user will permanently lose access to that directory.The text was updated successfully, but these errors were encountered: