On Windows, mkdir
can automatically create folder1\folder2
if they don’t already exist.
While mkdir folder1\folder2
works fine in a non-Cryptomator vault, it fails with this error on Cryptomator vaults:
The system cannot find the file specified.
I can reproduce this for WebDAV and Dokany volume types. I haven’t tried FUSE, but I assume it would happen on that type as well.
Here is a sample session showing the error:
c:\>REM c:\ is a non-vault drive.
c:\>REM notice folder1 does not exist.
c:\>dir folder1
Volume in drive C is Windows
Volume Serial Number is A068-150B
Directory of c:\
File Not Found
c:\>mkdir folder1\folder2
c:\>REM notice folder1\folder2 exists now.
c:\>dir folder1
Volume in drive C is Windows
Volume Serial Number is A068-150B
Directory of c:\folder1
01/06/24 12:45 <DIR> .
01/06/24 12:45 <DIR> folder2
0 File(s) 0 bytes
2 Dir(s) 228,822,663,168 bytes free
c:\>d:
D:\>REM d:\ is a vault drive.
D:\>REM folder1 does not exist.
D:\>dir folder1
Volume in drive D has no label.
Volume Serial Number is 0000-0000
Directory of D:\
File Not Found
D:\>mkdir folder1\folder2
The system cannot find the file specified.
D:\>REM notice we cannot create the nested folder1\folder2.
Is this a known issue? Is there any workaround for this error?
It’s mostly problematic when a vault is storing a Node.js project. npm
(Node Package Manager) attempts to create the necessary folder structure when installing package dependencies. webpack
(module bundler) also creates similar folder structures and runs into the error.