Monday, May 7, 2018 [Tweets] [Favorites]

iCloud Drive Breaks the macOS Command Line

Howard Oakley:

Apple’s current engineering solution breaks consistency of file names and paths. When a file has been evicted from local storage, and only exists in full in iCloud storage, the local stub file uses the previous name prefixed with a stop/period, and gains the extension of .icloud. When that file is downloaded to local storage – something which can be triggered by all sorts of events – the leading stop/period and the extension are stripped.

[…]

Many commands and scripts can safely ignore files which the user has placed in their iCloud Drive. But the moment that a user enables Desktop & Document Folders to be stored in iCloud, with Optimize Mac Storage enabled, file names in ~/Documents are affected, and commands and scripts will fail when run on one of the most important and active directories on most macOS systems.

[…]

Apple’s own most robust tool for locating files, the Finder alias, is broken by iCloud.

[…]

Inevitably, all hard and symbolic links made to evicted files are also broken by their eviction.

Faced with the problems posed by iCloud, a lot of commands, shell scripts and other scripting becomes inordinately complex, and in some cases impossible. Apple needs to continue to evolve the iCloud interface, making it consistent with the fundamental needs of commands and shell scripts. If it doesn’t, but continues to converge with iOS, it will undermine macOS itself.

Update (2018-05-10): See also: MacInTouch.

3 Comments

I don't think this has anything to do with iOS. It's just poorly engineered solution that worked while it was self-contained and got expanded to rest of the OS without thinking. They simply need to give a little more attention to "power" users. iCloud synced keychain has similar problem - it can't be accessed by any tools that can work with normal keychain, including Apple's own `security` command line tool, because it's special.

They need to make is so it doesn't use weird paths, weird file names, and weird behaviors. A normal folder, with normal filenames, that just happens to get synced to Apple Cloud. Dropbox does it so...it's possible.

another reason to just not use privacy-invading icloud...

Stay up-to-date by subscribing to the Comments RSS Feed for this post.

Leave a Comment