mkdir <foldername>: File exists - when the folder/file does not exist
Description
(Possibly related to https://github.com/cryptomator/cryptomator/issues/1484)
I tried copying files to the cryptomator drive, which seemed to fail. When I try create a directory with the same name as one of the copied directories within the mounted Cryptomator drive I get:
mkdir: foldername: File exists
Yet this folder or file does not exist:
ls foldername
ls: foldername: No such file or directory
System Setup
- Operating system and version: Mac Apple Silicon MacOS - Version 11.1
- Cryptomator version: 1.5.11
- Volume type: FUSE
Steps to Reproduce
- Install Fuse and Cryptomator, restart computer.
- Create drive
- Copy files across to drive using
cp -R folder /Volumes/drive/foldername
- These folders did not copy, try use mkdir to test.
mkdir foldername
Expected Behavior
If I cannot see the folder in the directory, I should be able to create one with that name, without being told there is a duplicate.
Actual Behavior
Folder copy seems to be in broken state, the file/folder does not exist, yet I cannot seem to create a folder with the same name.
mkdir: foldername: File exists
ls foldername
ls: foldername: No such file or directory
Reproducibility
Always
Additional Information
Logs
Not sure if this is related, but this is in the log file.
11:15:49.012 [Thread-8115] WARN o.c.c.dir.BrokenDirectoryFilter - Broken directory file /Users/user/Library/Mobile Documents/iCloud~com~setolabs~Cryptomator/Documents/drive/d/SC/redacted==.c9r/dir.c9r. Directory /Users/user/Library/Mobile Documents/iCloud~com~setolabs~Cryptomator/Documents/drive/d/HE/redacted does not exist.
I see from the error message that you are using the iCloud. Is the vault avaible offline? Or directly uploaded and the local copy deleted? And does the also appear if you move data to a local vault?
The log message says that you have a directory pointer file pointing to a non-existing child directory. Such directories are not accessible anymore and filtered from the file browser. Nonetheless the pointer file still exists, hence it is not possible to create a directory with the same name. This issue will be resolved with #1224.
I see from the error message that you are using the iCloud. Is the vault avaible offline? Or directly uploaded and the local copy deleted? And does the also appear if you move data to a local vault?
The log message says that you have a directory pointer file pointing to a non-existing child directory. Such directories are not accessible anymore and filtered from the file browser. Nonetheless the pointer file still exists, hence it is not possible to create a directory with the same name. This issue will be resolved with #1224.
The vault is available offline too. On a freshly created local vault, this doesn't seem to happen.
For a workaround:
In the log files the file path of the broken directory pointer files (dir.c9r) and their targeted directories are written. To be able to create those folders, do the following:
- Ensure your vault is completely synced
- For each broken pair:
- Ensure the targeted directory does not exist
- Remove the directory which contains the broken directory pointer file
When the above linked issue is implemented, this can be done automatically.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.