mandarons / icloud-drive-docker

Dockerized iCloud Client - make a local copy of your iCloud documents and photos, and keep it automatically up-to-date.
BSD 3-Clause "New" or "Revised" License
969 stars 46 forks source link

Cannot download files with reserved characters in path #151

Closed charlesvestal closed 9 months ago

charlesvestal commented 9 months ago

Describe the bug I noticed a file failing to download, and I am guessing that having a colon in the name is causing the sync command to fail

2023-09-20 09:29:46,298 :: ERROR :: root :: sync_drive.py :: 196 :: Failed to download /app/icloud/drive/Atom/Piano Roll 2.0.3/Logs/Session 2023-07-02 16:17:38.log: [Errno 22] Invalid argument: '/app/icloud/drive/Atom/Piano Roll 2.0.3/Logs/Session 2023-07-02 16:17:38.log'

I'm not sure how this was created in the first place (maybe iOS allows it?), but it might be worth allowing to rename on sync if filenames or folders contain special / reserved characters.

charlesvestal commented 9 months ago

I'm guessing this is actually related to my use of ExFAT as a destination directory. A quick test on my server lets me create a "test:test" folder on my ext4 volume, but fails with "invalid argument" on ExFAT, but noting on MacOS, it automatically replaces the characters when viewed in finder.

SCR-20230920-jgpn
mandarons commented 9 months ago

Yeah, sounds like ExFAT doesn't allow : as a valid filename character (https://en.wikipedia.org/wiki/ExFAT).

Can you use some modern filesystem (e.g. ext4) instead of ExFAT? This will also resolve your #152 problem.

charlesvestal commented 9 months ago

I can, but would have preferred it for interoperability with mac, in case of needing to restore. But if that’s the only option, I’ll move over!

mandarons commented 9 months ago

Yes, please move to some other modern filesystem. This is a corner case and not worth looking into it especially knowing that there is a workaround (upgrade to modern filesystem).