mirror of
https://github.com/rclone/rclone.git
synced 2025-12-15 15:53:41 +00:00
vfs: add tests and subsequent fixes
* Tests for VFS layer * Small fixes found during testing * Fix Close, Flush and Release behaviour for ReadFileHandle and WriteFileHandle * Fix nil object bugs on File
This commit is contained in:
@@ -35,7 +35,7 @@ var DefaultOpt = Options{
|
||||
Umask: 0,
|
||||
UID: ^uint32(0), // these values instruct WinFSP-FUSE to use the current user
|
||||
GID: ^uint32(0), // overriden for non windows in mount_unix.go
|
||||
DirPerms: os.FileMode(0777),
|
||||
DirPerms: os.FileMode(0777) | os.ModeDir,
|
||||
FilePerms: os.FileMode(0666),
|
||||
}
|
||||
|
||||
@@ -175,6 +175,9 @@ func New(f fs.Fs, opt *Options) *VFS {
|
||||
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
|
||||
|
||||
// Create root directory
|
||||
vfs.root = newDir(vfs, f, nil, fsDir)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user