mirror of
https://github.com/versity/versitygw.git
synced 2026-07-20 23:12:28 +00:00
fix: fix removal of the upload directory in posix CompleteMultipartUpload
In the posix backend, the path argument to os.RemoveAll() does not start with the bucket name. Since the path does not exist, os.RemoveAll() does nothing and uploaded parts are left in the ".sgwtmp" directory. This commit prefixes the path with the bucket name. Fixes issue #626. Signed-off-by: Christophe Vu-Brugier <christophe.vu-brugier@seagate.com>
This commit is contained in:
@@ -656,7 +656,7 @@ func (p *Posix) CompleteMultipartUpload(ctx context.Context, input *s3.CompleteM
|
||||
}
|
||||
|
||||
// cleanup tmp dirs
|
||||
os.RemoveAll(upiddir)
|
||||
os.RemoveAll(filepath.Join(bucket, objdir, uploadID))
|
||||
// use Remove for objdir in case there are still other uploads
|
||||
// for same object name outstanding, this will fail if there are
|
||||
os.Remove(filepath.Join(bucket, objdir))
|
||||
|
||||
Reference in New Issue
Block a user