mirror of
https://github.com/rclone/rclone.git
synced 2025-08-09 21:57:59 +02: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:
@ -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)
|
||||
|
Reference in New Issue
Block a user