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

Show warning if Cryptomator encounters placeholder files in iCloud Drive #1309

Closed
tobihagemann opened this issue Aug 19, 2020 · 6 comments
Closed

Comments

@tobihagemann
Copy link
Member

tobihagemann commented Aug 19, 2020

Summary

Show warning (e.g., dialog) if Cryptomator encounters placeholder files in iCloud Drive during vault access.

Motivation

Some people encounter empty vaults without any warnings or hints because iCloud Drive optimized the storage:

We already fixed that during migration, see cryptomator/cryptofs#83, but not during vault access.

Considered Alternatives

Ideally, there is some way to transparently "resolve" the placeholder files but I haven't looked into it.

@infeo
Copy link
Member

infeo commented Aug 20, 2020

Currently during vault access it is not possible to notify the users, because our underlying library cryptofs does not expose any way to send messages to the gui.

I opened a ticket (see cryptomator/cryptofs#89 ) there, but before we start thinking about that one, maybe there is another way. Maybe the logging can be utilized in a way, that there is a listener to WARN or ERRORS and then show a notification in the GUI.

@infeo
Copy link
Member

infeo commented Aug 20, 2020

As an alternative, if we get to know a way to resolved the placeholder files, we can just handle them as conflicts.

@tobihagemann
Copy link
Member Author

tobihagemann commented Aug 20, 2020

This is different to (sync) conflicts and shouldn't be resolved in that way.

Just did some research, you can actually download a placeholder via this shell command:

brctl download <filename>

More info here: https://apple.stackexchange.com/a/387727

But I still don't see a way to transparently access the file. You can retrieve some metadata of the actual file by reading the contents of the placeholder file which is a plist file in binary format (not XML!):

  • NSURLNameKey which holds the actual filename.
  • NSURLFileSizeKey which holds the actual file size.
  • NSURLFileResourceTypeKey which specifies what the actual file type is. For regular files it is NSURLFileResourceTypeRegular.

That's all I could find for now.

@tobihagemann
Copy link
Member Author

It has come to my attention that macOS 15 Sequioa introduced pinning to iCloud Drive via the extended attribute com.apple.fileprovider.pinned.

Based on this, I would suggest a different solution:

Show a warning (e.g., dialog) when Cryptomator unlocks a vault in iCloud Drive that doesn't have the extended attribute com.apple.fileprovider.pinned set.

What do you think, @infeo @overheadhunter?

@infeo
Copy link
Member

infeo commented Sep 17, 2024

@tobihagemann A general question, since some time has passed: Is the files-on-demand feature of iCloud still incompatible with Cryptomator?

And what about other file providers? The attribute does not seem iCloud specific.

@tobihagemann
Copy link
Member Author

Oh, you are right. I'm not sure, if this was fixed with macOS 15 Sequoia or earlier. I guess, this issue is obsolete. Thanks for pointing this out!

@infeo infeo removed this from the 1.x milestone Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants