Mkdir folder1\folder2 fails when working with vault on Windows

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


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.

I just ran a quick test on my Linux machine.
Linux uses fuse.

mkdir folder1 works
mkdir folder1/folder2 works

At least on Linux anyway I can’t create folder2 until folder one has already been created.

I will test on windows with fuse shortly.

Thank you for looking into this, LeoW. FUSE is working for me on Windows.

I also noticed I was on an older version of Cryptomator. I upgraded and set the volume type to Automatic. This is also working now.

Presumably, it’s picking WinFsp, since I no longer see FUSE as an option. The remaining types are Dokany and WebDAV which didn’t work.

Also found that Dokany support is deprecated, so changing the volume type (or setting it to Automatic) seems like the way forward: Volume Types — Cryptomator 1.7.0 documentation.

1 Like