@@ -956,28 +956,28 @@ func DeleteRepository(doer *user_model.User, uid, repoID int64) error {
956
956
}
957
957
958
958
// Remove archives
959
- for i := range archivePaths {
960
- admin_model .RemoveStorageWithNotice (db .DefaultContext , storage .RepoArchives , "Delete repo archive file" , archivePaths [ i ] )
959
+ for _ , archive := range archivePaths {
960
+ admin_model .RemoveStorageWithNotice (db .DefaultContext , storage .RepoArchives , "Delete repo archive file" , archive )
961
961
}
962
962
963
963
// Remove lfs objects
964
- for i := range lfsPaths {
965
- admin_model .RemoveStorageWithNotice (db .DefaultContext , storage .LFS , "Delete orphaned LFS file" , lfsPaths [ i ] )
964
+ for _ , lfsObj := range lfsPaths {
965
+ admin_model .RemoveStorageWithNotice (db .DefaultContext , storage .LFS , "Delete orphaned LFS file" , lfsObj )
966
966
}
967
967
968
968
// Remove issue attachment files.
969
- for i := range attachmentPaths {
970
- admin_model .RemoveStorageWithNotice (db .DefaultContext , storage .Attachments , "Delete issue attachment" , attachmentPaths [ i ] )
969
+ for _ , attachment := range attachmentPaths {
970
+ admin_model .RemoveStorageWithNotice (db .DefaultContext , storage .Attachments , "Delete issue attachment" , attachment )
971
971
}
972
972
973
973
// Remove release attachment files.
974
- for i := range releaseAttachments {
975
- admin_model .RemoveStorageWithNotice (db .DefaultContext , storage .Attachments , "Delete release attachment" , releaseAttachments [ i ] )
974
+ for _ , releaseAttachment := range releaseAttachments {
975
+ admin_model .RemoveStorageWithNotice (db .DefaultContext , storage .Attachments , "Delete release attachment" , releaseAttachment )
976
976
}
977
977
978
978
// Remove attachment with no issue_id and release_id.
979
- for i := range newAttachmentPaths {
980
- admin_model .RemoveStorageWithNotice (db .DefaultContext , storage .Attachments , "Delete issue attachment" , attachmentPaths [ i ] )
979
+ for _ , newAttachment := range newAttachmentPaths {
980
+ admin_model .RemoveStorageWithNotice (db .DefaultContext , storage .Attachments , "Delete issue attachment" , newAttachment )
981
981
}
982
982
983
983
if len (repo .Avatar ) > 0 {
0 commit comments