mirror of
https://github.com/rclone/rclone.git
synced 2025-12-11 22:14:05 +01:00
vfs: factor out the VFS option initialization for re-use #3259
This commit is contained in:
@@ -193,12 +193,8 @@ func New(f fs.Fs, opt *vfscommon.Options) *VFS {
|
||||
vfs.Opt = vfscommon.DefaultOpt
|
||||
}
|
||||
|
||||
// Mask the permissions with the umask
|
||||
vfs.Opt.DirPerms &= ^os.FileMode(vfs.Opt.Umask)
|
||||
vfs.Opt.FilePerms &= ^os.FileMode(vfs.Opt.Umask)
|
||||
|
||||
// Make sure directories are returned as directories
|
||||
vfs.Opt.DirPerms |= os.ModeDir
|
||||
// Fill out anything else
|
||||
vfs.Opt.Init()
|
||||
|
||||
// Find a VFS with the same name and options and return it if possible
|
||||
activeMu.Lock()
|
||||
|
||||
Reference in New Issue
Block a user