Add mount options support

This commit is contained in:
Vitaliy Filippov 2021-07-16 16:12:57 +03:00
parent 0433ead376
commit d78d476d6d
6 changed files with 36 additions and 4 deletions
pkg/mounter

View file

@ -50,9 +50,9 @@ func (rclone *rcloneMounter) Mount(source string, target string) error {
fmt.Sprintf("--s3-region=%s", rclone.region),
fmt.Sprintf("--s3-endpoint=%s", rclone.url),
"--allow-other",
// TODO: make this configurable
"--vfs-cache-mode=writes",
}
args = append(args, rclone.meta.MountOptions...)
os.Setenv("AWS_ACCESS_KEY_ID", rclone.accessKeyID)
os.Setenv("AWS_SECRET_ACCESS_KEY", rclone.secretAccessKey)
return fuseMount(target, rcloneCmd, args)