miguelpruivo / flutter_file_picker

File picker plugin for Flutter, compatible with mobile (iOS & Android), Web, Desktop (Mac, Linux, Windows) platforms with Flutter Go support.
MIT License
1.33k stars 668 forks source link

`FilePicker.platform.getDirectoryPath()` seems to be moving the original directory to `tmp` directory [IOS] #1440

Closed hasanmhallak closed 3 weeks ago

hasanmhallak commented 9 months ago

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?

final path = await FilePicker.platform.getDirectoryPath();
       print(path);

Details to reproduce the issue Try to use FilePicker.platform.getDirectoryPath() on any directory.

Error Log N/A

Screenshots and/or video

https://github.com/miguelpruivo/flutter_file_picker/assets/95232508/f0e1f64f-4b6c-47c8-8bbb-a3a7328bcda4

Flutter Version details

[✓] Flutter (Channel stable, 3.16.4, on macOS 13.5.2 22G91 darwin-arm64, locale
    en-EG)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 15.1)
[✓] Chrome - develop for the web
[!] Android Studio (version unknown)
    ✗ Unable to determine Android Studio version.
    ✗ Unable to find bundled Java version.
[✓] VS Code (version 1.85.2)
[✓] Connected device (3 available)
[✓] Network resources

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.

github-actions[bot] commented 2 months ago

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

hasanmhallak commented 2 months ago

bump

github-actions[bot] commented 2 months ago

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

miguelpruivo commented 2 months ago

Hi, I really don't have the time right now to look into this — just flagging for triage so it doesn't close on its own, I'd thank if anyone has the time to investigate and issue a PR. Shouldn't be a major thing, if this is related to a specific platform, I suspect of new iOS SDK breaking changes.

github-actions[bot] commented 1 month ago

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

ready4sea commented 1 month ago

bump

github-actions[bot] commented 1 month ago

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

github-actions[bot] commented 3 weeks ago

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

ElHyperion commented 3 weeks ago

Bump. I don't think this issue has been flagged correctly to not close automatically, could @miguelpruivo please fix that?

coderghl commented 3 weeks ago

Bump. I don't think this issue has been flagged correctly to not close automatically, could @miguelpruivo please fix that?

The latest version seems to have fixed this issue,you can try it.

ElHyperion commented 2 weeks ago

The latest version seems to have fixed this issue,you can try it.

Thanks, I missed that update, works fine now 👍🏻