Commit 7c2bcfc4 authored by Vitaliy Filippov's avatar Vitaliy Filippov
Browse files

Do not pass empty region, use stderr for GeeseFS log

parent bca84a06
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -42,8 +42,11 @@ func (geesefs *geesefsMounter) Mount(source string, target string) error {
	fullPath := fmt.Sprintf("%s:%s", geesefs.meta.BucketName, geesefs.meta.Prefix)
	args := []string{
		"--endpoint", geesefs.endpoint,
		"--region", geesefs.region,
		"-o", "allow_other",
		"--log-file", "/dev/stderr",
	}
	if geesefs.region != "" {
		args = append(args, "--region", geesefs.region)
	}
	args = append(args, geesefs.meta.MountOptions...)
	args = append(args, fullPath, target)
+3 −1
Original line number Diff line number Diff line
@@ -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)
+3 −1
Original line number Diff line number Diff line
@@ -45,10 +45,12 @@ func (s3fs *s3fsMounter) Mount(source string, target string) error {
		target,
		"-o", "use_path_request_style",
		"-o", fmt.Sprintf("url=%s", s3fs.url),
		"-o", fmt.Sprintf("endpoint=%s", s3fs.region),
		"-o", "allow_other",
		"-o", "mp_umask=000",
	}
	if s3fs.region != "" {
		args = append(args, "-o", fmt.Sprintf("endpoint=%s", s3fs.region))
	}
	args = append(args, s3fs.meta.MountOptions...)
	return fuseMount(target, s3fsCmd, args)
}