rclone/cmd/cmount
albertony 0093e23e42 mount: changed handling of volume name (Windows and OSX)
Fixes an issue on Windows where mounting the local filesystem in network mode failed
when not using option --volname. Reason was that the volume name in network mode
is a network share path in the basic UNC format, and characters that are invalid
in regular file and directory names are also invalid in such a path. And the default
volume name would typically include a '?', which is invalid, from the unc path of
the local, e.g. "\\server\\? C  Temp".

The fix is to use an encoder to encode invalid characters such as '?' with the unicode
equivalent, similar to how rclone encodes filesystem paths in normal operations,
when mounting in network mode. Also performs some automatic cleanup of path separators,
but in general, tries to be conservative on restrictions, and instead rely on --volname
being set to something realistic.

Existing strategy to replace the two characters ':' and '/' with space, regardless of
mounting mode variant, was removed. For network mode the new approach handles these in
a better way. Also the existing method did not apply at all when using the implicit
network mode where volume names are taken from mountpath instead of volname option
("rclone mount remote:path/to/files \\cloud\remote"). For non-network mode they were not
needed.

Default volume names, when not specified by user, will be different with this change.

See: #6234
2023-03-03 20:59:45 +01:00
..
arch.go selfupdate: abort if updating would discard fuse semantics 2021-03-22 22:55:24 +03:00
fs.go cmount: fix creating and renaming files on case insensitive backends 2023-01-11 17:21:57 +00:00
mount_brew.go build: add package comments to silence revive linter 2022-08-28 13:43:51 +02:00
mount_test.go build: add package comments to silence revive linter 2022-08-28 13:43:51 +02:00
mount_unsupported.go build: add package comments to silence revive linter 2022-08-28 13:43:51 +02:00
mount.go mount: avoid incorrect or premature overlap check on windows 2023-01-24 22:27:02 +01:00
mountpoint_other.go mount: changed handling of volume name (Windows and OSX) 2023-03-03 20:59:45 +01:00
mountpoint_windows.go mount: changed handling of volume name (Windows and OSX) 2023-03-03 20:59:45 +01:00