From f77058b817f11fbf8c4b6fc95f7a65d19caa14de Mon Sep 17 00:00:00 2001 From: Ben McClelland Date: Mon, 10 Mar 2025 13:44:24 -0700 Subject: [PATCH] fix: scoutfs multipart cleanup in complete/abort mp This was previously not including the bucket directory for the mutlipart temp file cleanup. This fixes leftovers in the tmp directories after uploading multipart uploads. --- backend/scoutfs/scoutfs.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/scoutfs/scoutfs.go b/backend/scoutfs/scoutfs.go index e283f6ee..92810c69 100644 --- a/backend/scoutfs/scoutfs.go +++ b/backend/scoutfs/scoutfs.go @@ -352,10 +352,10 @@ func (s *ScoutFS) CompleteMultipartUpload(ctx context.Context, input *s3.Complet } // cleanup tmp dirs - os.RemoveAll(upiddir) + os.RemoveAll(filepath.Join(bucket, upiddir)) // use Remove for objdir in case there are still other uploads // for same object name outstanding - os.Remove(objdir) + os.Remove(filepath.Join(bucket, objdir)) return &s3.CompleteMultipartUploadOutput{ Bucket: &bucket,