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

Issue copying Folders with iOS 18.4 #137

Open
jlajara-quadient opened this issue Apr 1, 2025 · 0 comments
Open

Issue copying Folders with iOS 18.4 #137

jlajara-quadient opened this issue Apr 1, 2025 · 0 comments

Comments

@jlajara-quadient
Copy link

Hello, after updating to Xcode 16.3.0 and using the simulator with iOS 18.4 I have a strange behavior causing errors in my unit tests when copying folders.

I think the issue comes from this method in Files extension Storage.
Image
when copying the "Config" folder
produces this :
Image

instead of this :
Image

copyItem(atPath srcPath: String, toPath dstPath: String) is deprecated

using copyItem(at srcURL: URL, to dstURL: URL) and converting the path string to URL with URL(fileURLWithPath: path)
Gives the desired result.

nilsgrabenhorst added a commit to nilsgrabenhorst/Files that referenced this issue Apr 3, 2025
nilsgrabenhorst added a commit to nilsgrabenhorst/Files that referenced this issue Apr 3, 2025
In Xcode 16.3, copyItem(atPath:toPath:) does not work correctly with nested folders:

* Given two nested folders A and B, it creates just one destination folder named AB instead of the expected A/B.
* Also, given a folder A containing a file B.txt, it creates the file AB.txt instead of the expected file-in-folder A/B.txt.

The copyItem(at:to:) method with URL parameters works as expected.

Credit: https://github.com/jlajara-quadient for bug report and solution.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant