mirror of
https://github.com/rclone/rclone.git
synced 2024-11-07 17:14:44 +01:00
s3: don't check to see if remote is object if it ends with /
Before this change, rclone would always check the root to see if it was an object. This change doesn't check to see if the root is an object if the path ends with a / This avoids a transaction where rclone HEADs the path to see if it exists. See #4990
This commit is contained in:
parent
1773717a47
commit
c0cda087a8
@ -1693,7 +1693,7 @@ func NewFs(ctx context.Context, name, root string, m configmap.Mapper) (fs.Fs, e
|
||||
GetTier: true,
|
||||
SlowModTime: true,
|
||||
}).Fill(ctx, f)
|
||||
if f.rootBucket != "" && f.rootDirectory != "" && !opt.NoHeadObject {
|
||||
if f.rootBucket != "" && f.rootDirectory != "" && !opt.NoHeadObject && !strings.HasSuffix(root, "/") {
|
||||
// Check to see if the (bucket,directory) is actually an existing file
|
||||
oldRoot := f.root
|
||||
newRoot, leaf := path.Split(oldRoot)
|
||||
|
Loading…
Reference in New Issue
Block a user