Go: add context to storage (#17690)

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
This commit is contained in:
Jin Hai
2026-08-03 15:08:21 +08:00
committed by GitHub
parent 2dbdaf951d
commit bddc941814
42 changed files with 634 additions and 527 deletions
+2 -2
View File
@@ -560,7 +560,7 @@ func (s *FileService) moveEntryRecursive(ctx context.Context, sourceFile *entity
// Calculate new location
newLocation := effectiveName
for storageImpl.ObjExist(destFolder.ID, newLocation) {
for storageImpl.ObjExist(ctx, destFolder.ID, newLocation) {
newLocation += "_"
}
@@ -569,7 +569,7 @@ func (s *FileService) moveEntryRecursive(ctx context.Context, sourceFile *entity
return fmt.Errorf("file location is empty")
}
if !storageImpl.Move(sourceFile.ParentID, *sourceFile.Location, destFolder.ID, newLocation) {
if !storageImpl.Move(ctx, sourceFile.ParentID, *sourceFile.Location, destFolder.ID, newLocation) {
return fmt.Errorf("move file failed at storage layer")
}