Folder shows up twice; Seems to be a link of some kind or something

Hi all,

I have a very strange behavior in my vault with Cryptomator 1.5.10 both on linux and on android.

My vault contains a folder that is shown twice (with slightly different name) or they are two folders, but they share the content. So if I add a file to one folder, it also appears in the other folder.

When I delete one of the folders, the other one disappears as well.

Looking at the folders in bash, they look like normal folders. One called “folder a” and the other called “folder-a”.

drwx------ 1 user users 4096 Dez 2 23:58 ‘folder a’
drwx------ 1 user users 4096 Dez 2 23:58 folder-a

The problem occurred when I renamed the folder and shortly afterward decided to undo the change. This was on linux while the vault was being monitored by insync for synchronisation with google drive. So I guess something went wrong there.

The problem now is that the duplication is propagated to the cloud, so if I open the vault from an other machine, I see the duplicate too.

How can I fix this and remove one of the two folders, but leave the other one untouched?

Kind regards,
Dominik

PS: at the same time when the (sync?!) error happened, another file/folder was created that is only visible from bash, but cannot be deleted. Not even as root.

??? ? ? ? ? ? ‘Untitled Folder’

I never found a solution other than to create a new Cryptomator vault and copy the non-corrupted files over.

  1. lock vault
  2. stop cloud sync
  3. move vault to a backup-location
  4. create new vault in the original location with the same credentials
  5. unlock & mount both vaults
  6. move/copy all non-corrupted files from within the old into the new vault.
  7. lock both vaults
  8. delete the old vault
  9. re-enable cloud sync

I had the same problem again and I still don’t know what causes this. But I found an other solution that might help if you have the same issue:

Try to identify which encrypted folders/files correspond to the corrupt files or directories in your vault and delete the encrypted folders/files from your filesystem to make the corrupt files/directories go away in your vault.

!!!Warning!!!
Follow these instructions on your own risk! Make a backup of the full vault before you do this!
!!!Warning!!!

This might cause orphan files in your vault, as by deleting a dir.c9r file (that corresponds to a corrupt directory in your vault) the files that are located in that directory (but are no longer accessible) stay on your filesystem. I am not sure if these orphans pose a problem to the vault integrity or if they are cleaned up by cryptomator in any way.

To identify what to delete from the filesystem I did the following:

  • navigate to the directory in your vault that contains the corrupt file or directory.
  • move all non corrupt files/directories to a different location (inside the vault or outside).
  • take a snapshot of all encrypted files & directories (on linux you can cd into your vault directory and use “find d” to get a list)
  • rename the parent directory that contains the corrupt files/folders
  • take a snapshot of all encrypted files & directories again and compare with the first snapshot
  • there should be one directory (with a dir.c9r file) be different in both snapshots.
  • unmount the vault.
  • delete the directory containing that file.
  • re-mount the vault and check if the result is as expected.
  • re-create the parent directory in the vault and copy the other files back into place.

Good luck!