This commit is contained in:
dukai 2025-05-26 17:07:00 +08:00
parent 6b32448a65
commit d07dc19f31
2 changed files with 10 additions and 2 deletions

View File

@ -79,6 +79,10 @@ func (f *FileSystemManager) copyFolderSubEntries(ctx context.Context, oldPath ut
return err
}
if len(entries) == 0 {
break
}
for _, item := range entries {
itemOldPath := oldPath.Child(item.FullPath.Name())
itemNewPath := newPath.Child(item.FullPath.Name())
@ -88,7 +92,7 @@ func (f *FileSystemManager) copyFolderSubEntries(ctx context.Context, oldPath ut
}
}
if lastFileName == "" {
if lastFileName == "" || len(entries) < 1000 {
break
}
}

View File

@ -77,6 +77,10 @@ func (f *FileSystemManager) moveFolderSubEntries(ctx context.Context, oldPath ut
return err
}
if len(entries) == 0 {
break
}
for _, item := range entries {
itemOldPath := oldPath.Child(item.FullPath.Name())
itemNewPath := newPath.Child(item.FullPath.Name())
@ -86,7 +90,7 @@ func (f *FileSystemManager) moveFolderSubEntries(ctx context.Context, oldPath ut
}
}
if lastFileName == "" {
if lastFileName == "" || len(entries) < 1000 {
break
}
}