mirror of
https://github.com/rclone/rclone.git
synced 2025-02-08 04:51:59 +08:00
s3: fix incorrect tier support for StorJ and IDrive when pointing at a file
Fixes #6734
This commit is contained in:
parent
37623732c6
commit
14e852ee9d
|
@ -2989,6 +2989,15 @@ func NewFs(ctx context.Context, name, root string, m configmap.Mapper) (fs.Fs, e
|
||||||
GetTier: true,
|
GetTier: true,
|
||||||
SlowModTime: true,
|
SlowModTime: true,
|
||||||
}).Fill(ctx, f)
|
}).Fill(ctx, f)
|
||||||
|
if opt.Provider == "Storj" {
|
||||||
|
f.features.SetTier = false
|
||||||
|
f.features.GetTier = false
|
||||||
|
}
|
||||||
|
if opt.Provider == "IDrive" {
|
||||||
|
f.features.SetTier = false
|
||||||
|
}
|
||||||
|
// f.listMultipartUploads()
|
||||||
|
|
||||||
if f.rootBucket != "" && f.rootDirectory != "" && !opt.NoHeadObject && !strings.HasSuffix(root, "/") {
|
if f.rootBucket != "" && f.rootDirectory != "" && !opt.NoHeadObject && !strings.HasSuffix(root, "/") {
|
||||||
// Check to see if the (bucket,directory) is actually an existing file
|
// Check to see if the (bucket,directory) is actually an existing file
|
||||||
oldRoot := f.root
|
oldRoot := f.root
|
||||||
|
@ -3003,14 +3012,6 @@ func NewFs(ctx context.Context, name, root string, m configmap.Mapper) (fs.Fs, e
|
||||||
// return an error with an fs which points to the parent
|
// return an error with an fs which points to the parent
|
||||||
return f, fs.ErrorIsFile
|
return f, fs.ErrorIsFile
|
||||||
}
|
}
|
||||||
if opt.Provider == "Storj" {
|
|
||||||
f.features.SetTier = false
|
|
||||||
f.features.GetTier = false
|
|
||||||
}
|
|
||||||
if opt.Provider == "IDrive" {
|
|
||||||
f.features.SetTier = false
|
|
||||||
}
|
|
||||||
// f.listMultipartUploads()
|
|
||||||
return f, nil
|
return f, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user