Do not pass empty region, use stderr for GeeseFS log

This commit is contained in:
Vitaliy Filippov 2021-09-07 13:37:04 +03:00
parent 63c658384f
commit 462812730a
3 changed files with 10 additions and 3 deletions
pkg/mounter

View file

@ -47,11 +47,13 @@ func (rclone *rcloneMounter) Mount(source string, target string) error {
"--daemon",
"--s3-provider=AWS",
"--s3-env-auth=true",
fmt.Sprintf("--s3-region=%s", rclone.region),
fmt.Sprintf("--s3-endpoint=%s", rclone.url),
"--allow-other",
"--vfs-cache-mode=writes",
}
if rclone.region != "" {
args = append(args, fmt.Sprintf("--s3-region=%s", rclone.region))
}
args = append(args, rclone.meta.MountOptions...)
os.Setenv("AWS_ACCESS_KEY_ID", rclone.accessKeyID)
os.Setenv("AWS_SECRET_ACCESS_KEY", rclone.secretAccessKey)