1
0
mirror of https://github.com/rclone/rclone.git synced 2026-01-04 01:23:24 +00:00

mount: change interface of mount commands to take VFS

This is in preparation of being able to pass options to the rc command
"mount/mount"
This commit is contained in:
Nick Craig-Wood
2020-07-22 17:58:49 +01:00
parent 744828a4de
commit 2871268505
12 changed files with 72 additions and 62 deletions

View File

@@ -10,6 +10,8 @@ import (
"github.com/pkg/errors"
"github.com/rclone/rclone/fs"
"github.com/rclone/rclone/fs/rc"
"github.com/rclone/rclone/vfs"
"github.com/rclone/rclone/vfs/vfsflags"
)
// MountInfo defines the configuration for a mount
@@ -91,7 +93,8 @@ func mountRc(_ context.Context, in rc.Params) (out rc.Params, err error) {
}
if mountFns[mountType] != nil {
_, _, unmountFn, err := mountFns[mountType](fdst, mountPoint)
VFS := vfs.New(fdst, &vfsflags.Opt)
_, unmountFn, err := mountFns[mountType](VFS, mountPoint)
if err != nil {
log.Printf("mount FAILED: %v", err)