VFS cache filenames not being sanitized on windows mount

What is the problem you are having with rclone?

rclone seems to not sanitize the filenames for files being created in the vfs cache on windows.
I have a file named 123"45.webm on google drive. When I mount the drive on windows it's displayed in the explorer mount with the name 12345.webm and not 123"45.webm which is what I get when I download this file from drive to windows with rclone copy. When I try to open this file on the mount I just get a bunch of errors in the rclone output. Looks to me like it's trying to create the file with its original name even though the quote character is not legal for a windows filename.

What is your rclone version (output from rclone version)

rclone v1.54.0

  • os/arch: windows/amd64
  • go version: go1.15.7

Which OS you are using and how many bits (eg Windows 7, 64 bit)

Win10 20H2

Which cloud storage system are you using? (eg Google Drive)

Google Drive

The command you were trying to run (eg rclone copy /tmp remote:tmp)

rclone mount mydrive: M: --vfs-cache-mode full --cache-dir "F:\Cache"

The rclone config contents with secrets removed.

Irrelevant for this case

A log from the command

Without the -vv flag and with a bunch of lines being repeated hundreds of times removed

The service rclone has been started.
2021/02/08 19:10:44 ERROR : 123"45.webm: vfs cache: failed to remove cache file as failed to stat cache file: CreateFile \\?\F:\Cache\vfs\mydrive\123"45.webm: The filename, directory name, or volume label syntax is incorrect.: remove \\?\F:\Cache\vfs\mydrive\123"45.webm: The filename, directory name, or volume label syntax is incorrect.
2021/02/08 19:10:44 ERROR : 123"45.webm: vfs cache: failed to remove metadata from cache as failed to stat cache file: CreateFile \\?\F:\Cache\vfs\mydrive\123"45.webm: The filename, directory name, or volume label syntax is incorrect.: remove \\?\F:\Cache\vfsMeta\mydrive\123"45.webm: The filename, directory name, or volume label syntax is incorrect.
2021/02/08 19:10:44 ERROR : 123"45.webm: vfs cache: failed to remove cache file as failed to load metadata: vfs cache item: failed to read metadata: open \\?\F:\Cache\vfsMeta\mydrive\123"45.webm: The filename, directory name, or volume label syntax is incorrect.: remove \\?\F:\Cache\vfs\mydrive\123"45.webm: The filename, directory name, or volume label syntax is incorrect.
2021/02/08 19:10:44 ERROR : 123"45.webm: vfs cache: failed to remove metadata from cache as failed to load metadata: vfs cache item: failed to read metadata: open \\?\F:\Cache\vfsMeta\mydrive\123"45.webm: The filename, directory name, or volume label syntax is incorrect.: remove \\?\F:\Cache\vfsMeta\mydrive\123"45.webm: The filename, directory name, or volume label syntax is incorrect.
2021/02/08 19:10:44 ERROR : 123"45.webm: vfs cache: failed to open item: vfs cache item: check object failed: vfs cache item: open truncate failed: truncate to current size: CreateFile \\?\F:\Cache\vfs\mydrive\123"45.webm: The filename, directory name, or volume label syntax is incorrect.
2021/02/08 19:10:44 ERROR : 123"45.webm: Non-out-of-space error encountered during open
2021/02/08 19:10:44 ERROR : IO error: open RW handle failed to open cache file: vfs cache item: check object failed: vfs cache item: open truncate failed: truncate to current size: CreateFile \\?\F:\Cache\vfs\mydrive\123"45.webm: The filename, directory name, or volume label syntax is incorrect.
2021/02/08 19:10:44 ERROR : 123"45.webm: Size: Item GetSize failed: CreateFile \\?\F:\Cache\vfs\mydrive\123"45.webm: The filename, directory name, or volume label syntax is incorrect.
2021/02/08 19:10:44 ERROR : 123"45.webm: Size: Item GetSize failed: CreateFile \\?\F:\Cache\vfs\mydrive\123"45.webm: The filename, directory name, or volume label syntax is incorrect.
2021/02/08 19:10:44 ERROR : 123"45.webm: vfs cache: failed to open item: vfs cache item: check object failed: vfs cache item: open truncate failed: truncate to current size: CreateFile \\?\F:\Cache\vfs\mydrive\123"45.webm: The filename, directory name, or volume label syntax is incorrect.
2021/02/08 19:10:44 ERROR : 123"45.webm: Non-out-of-space error encountered during open
2021/02/08 19:10:44 ERROR : IO error: open RW handle failed to open cache file: vfs cache item: check object failed: vfs cache item: open truncate failed: truncate to current size: CreateFile \\?\F:\Cache\vfs\mydrive\123"45.webm: The filename, directory name, or volume label syntax is incorrect.
2021/02/08 19:10:44 ERROR : 123"45.webm: Size: Item GetSize failed: CreateFile \\?\F:\Cache\vfs\mydrive\123"45.webm: The filename, directory name, or volume label syntax is incorrect.
2021/02/08 19:10:44 ERROR : 123"45.webm: Size: Item GetSize failed: CreateFile \\?\F:\Cache\vfs\mydrive\123"45.webm: The filename, directory name, or volume label syntax is incorrect.
2021/02/08 19:10:44 ERROR : 123"45.webm: Size: Item GetSize failed: CreateFile \\?\F:\Cache\vfs\mydrive\123"45.webm: The filename, directory name, or volume label syntax is incorrect.
2021/02/08 19:10:44 ERROR : 123"45.webm: Size: Item GetSize failed: CreateFile \\?\F:\Cache\vfs\mydrive\123"45.webm: The filename, directory name, or volume label syntax is incorrect.
2021/02/08 19:10:45 ERROR : 123"45.webm: Size: Item GetSize failed: CreateFile \\?\F:\Cache\vfs\mydrive\123"45.webm: The filename, directory name, or volume label syntax is incorrect.
2021/02/08 19:10:45 ERROR : 123"45.webm: Size: Item GetSize failed: CreateFile \\?\F:\Cache\vfs\mydrive\123"45.webm: The filename, directory name, or volume label syntax is incorrect.
2021/02/08 19:10:45 ERROR : 123"45.webm: Size: Item GetSize failed: CreateFile \\?\F:\Cache\vfs\mydrive\123"45.webm: The filename, directory name, or volume label syntax is incorrect.
2021/02/08 19:10:45 ERROR : 123"45.webm: Size: Item GetSize failed: CreateFile \\?\F:\Cache\vfs\mydrive\123"45.webm: The filename, directory name, or volume label syntax is incorrect.
2021/02/08 19:10:45 ERROR : 123"45.webm: Size: Item GetSize failed: CreateFile \\?\F:\Cache\vfs\mydrive\123"45.webm: The filename, directory name, or volume label syntax is incorrect.
2021/02/08 19:10:45 ERROR : 123"45.webm: vfs cache: failed to open item: vfs cache item: check object failed: vfs cache item: open truncate failed: truncate to current size: CreateFile \\?\F:\Cache\vfs\mydrive\123"45.webm: The filename, directory name, or volume label syntax is incorrect.
2021/02/08 19:10:45 ERROR : 123"45.webm: Non-out-of-space error encountered during open
2021/02/08 19:10:45 ERROR : IO error: open RW handle failed to open cache file: vfs cache item: check object failed: vfs cache item: open truncate failed: truncate to current size: CreateFile \\?\F:\Cache\vfs\mydrive\123"45.webm: The filename, directory name, or volume label syntax is incorrect.
2021/02/08 19:10:45 ERROR : 123"45.webm: vfs cache: failed to open item: vfs cache item: check object failed: vfs cache item: open truncate failed: truncate to current size: CreateFile \\?\F:\Cache\vfs\mydrive\123"45.webm: The filename, directory name, or volume label syntax is incorrect.
2021/02/08 19:10:45 ERROR : 123"45.webm: Non-out-of-space error encountered during open
2021/02/08 19:10:45 ERROR : IO error: open RW handle failed to open cache file: vfs cache item: check object failed: vfs cache item: open truncate failed: truncate to current size: CreateFile \\?\F:\Cache\vfs\mydrive\123"45.webm: The filename, directory name, or volume label syntax is incorrect.
2021/02/08 19:10:45 ERROR : 123"45.webm: vfs cache: failed to open item: vfs cache item: check object failed: vfs cache item: open truncate failed: truncate to current size: CreateFile \\?\F:\Cache\vfs\mydrive\123"45.webm: The filename, directory name, or volume label syntax is incorrect.
2021/02/08 19:10:45 ERROR : 123"45.webm: Non-out-of-space error encountered during open
2021/02/08 19:10:46 ERROR : IO error: open RW handle failed to open cache file: vfs cache item: check object failed: vfs cache item: open truncate failed: truncate to current size: CreateFile \\?\F:\Cache\vfs\mydrive\123"45.webm: The filename, directory name, or volume label syntax is incorrect.
2021/02/08 19:10:46 ERROR : 123"45.webm: vfs cache: failed to open item: vfs cache item: check object failed: vfs cache item: open truncate failed: truncate to current size: CreateFile \\?\F:\Cache\vfs\mydrive\123"45.webm: The filename, directory name, or volume label syntax is incorrect.
2021/02/08 19:10:46 ERROR : 123"45.webm: Non-out-of-space error encountered during open
2021/02/08 19:10:46 ERROR : IO error: open RW handle failed to open cache file: vfs cache item: check object failed: vfs cache item: open truncate failed: truncate to current size: CreateFile \\?\F:\Cache\vfs\mydrive\123"45.webm: The filename, directory name, or volume label syntax is incorrect.
2021/02/08 19:10:46 ERROR : 123"45.webm: vfs cache: failed to open item: vfs cache item: check object failed: vfs cache item: open truncate failed: truncate to current size: CreateFile \\?\F:\Cache\vfs\mydrive\123"45.webm: The filename, directory name, or volume label syntax is incorrect.
2021/02/08 19:10:46 ERROR : 123"45.webm: Non-out-of-space error encountered during open

That sounds like a bug!

Can you please make a new issue on github about this please and we'll fix.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.