1
0
mirror of https://github.com/rclone/rclone.git synced 2025-12-06 00:03:32 +00:00

mount: more user friendly mounting as network drive on windows

Add --network-mode option to activate mounting as network drive without having to set volume prefix.
Add support for automatic drive letter assignment (not specific to network drive mounting).
Allow full network share unc path in --volname, which will also implicitely activate network drive mounting.
Allow full network share unc path as mountpoint, which will also implicitely activate network drive mounting, and the specified path will be used as volume prefix and the remote will be mounted on an automatically assigned drive letter instead.
This commit is contained in:
albertony
2020-11-06 14:21:38 +01:00
committed by Nick Craig-Wood
parent 9ea990d5a2
commit e92cb9e8f8
7 changed files with 265 additions and 23 deletions

View File

@@ -44,6 +44,7 @@ type Options struct {
NoAppleXattr bool
DaemonTimeout time.Duration // OSXFUSE only
AsyncRead bool
NetworkMode bool // Windows only
}
// DefaultOpt is the default values for creating the mount
@@ -99,6 +100,8 @@ func AddFlags(flagSet *pflag.FlagSet) {
if runtime.GOOS == "darwin" {
flags.BoolVarP(flagSet, &Opt.NoAppleDouble, "noappledouble", "", Opt.NoAppleDouble, "Sets the OSXFUSE option noappledouble.")
flags.BoolVarP(flagSet, &Opt.NoAppleXattr, "noapplexattr", "", Opt.NoAppleXattr, "Sets the OSXFUSE option noapplexattr.")
} else if runtime.GOOS == "windows" {
flags.BoolVarP(flagSet, &Opt.NetworkMode, "network-mode", "", Opt.NetworkMode, "Mount as remote network drive, instead of fixed disk drive.")
}
}