Windows, 1.64.2
I'm running into issues with filenames not being supported on the remote when using Microsoft Office on files on an rclone mount, which is causing strange behavior. For example:
2023/11/19 08:44:55 ERROR : Dropbox root '': sync batch commit: failed to commit batch length 1: batch had 1 errors: last error: path/disallowed_name
2023/11/19 08:44:55 ERROR : Documents/~$stDocument.docx: Failed to copy: upload failed: batch upload failed: path/disallowed_name
2023/11/19 08:44:55 ERROR : Documents/~$stDocument.docx: vfs cache: failed to upload try #1, will retry in 10s: vfs cache: failed to transfer file from cache to remote: upload failed: batch upload failed: path/disallowed_name
2023/11/19 08:45:07 ERROR : Dropbox root '': sync batch commit: failed to commit batch length 1: batch had 1 errors: last error: path/disallowed_name
2023/11/19 08:45:07 ERROR : Documents/~$stDocument.docx: Failed to copy: upload failed: batch upload failed: path/disallowed_name
2023/11/19 08:45:07 ERROR : Documents/~$stDocument.docx: vfs cache: failed to upload try #2, will retry in 20s: vfs cache: failed to transfer file from cache to remote: upload failed: batch upload failed: path/disallowed_name
2023/11/19 08:45:28 ERROR : Dropbox root '': sync batch commit: failed to commit batch length 1: batch had 1 errors: last error: path/disallowed_name
2023/11/19 08:45:28 ERROR : Documents/~$stDocument.docx: Failed to copy: upload failed: batch upload failed: path/disallowed_name
2023/11/19 08:45:28 ERROR : Documents/~$stDocument.docx: vfs cache: failed to upload try #3, will retry in 40s: vfs cache: failed to transfer file from cache to remote: upload failed: batch upload failed: path/disallowed_name
At this point Word can't save the file due to a "file permissions error". I need to save the file to a local drive. Then I can't copy the file to the remote even via Windows Explorer, because "the filename is not valid". I have to close the mount, remount it and then I can copy the file.
EDIT: It's worth noting that using --network-mode
also screws with Office, because rclone makes it look like a network drive mounted from \\server
, and then Office sits there trying to contact "\\server
" for a good 30+ seconds before "giving up" and just opening the file.
It looks like I can solve this by adding an exclude pattern to the mount command, like:
rclone mount --exclude "~$*" --vfs-cache-mode full remote: y:
But it's easy to forget to include that exclude statement, and that doesn't solve the issue of potentially needing more of them if some other application plays weird games with files. Eventually I end up needing a fancy script to mount a remote with all of the options required to make it play nice.
It might already exist, but is there a way to specify some sort of "default" exclude patterns for a remote in the configuration, so that any operations done on that remote use the given exclude patterns all the time? (Perhaps an option like --ignore-excludes would bypass it if necessary?) It would make the most sense for this to be remote-specific, not global, since "~$" filenames would be just fine for, say, local syncing or syncing to an SFTP server.
I could actually see a "default options" being useful in other ways too - for example, being able to provide a list of command line options per remote that apply all the time if relevant (and could be overridden somehow if needed). For example, --vfs-cache-mode full being applied all the time for any operation on a given remote where that option has meaning. Or even cosmetic things - --volname "something" always being applied on mount.
It would be "best" if this could be stored in the rclone.conf file since that would allow those settings to carry over if you copy the config file to another system.