diff options
author | zeripath <art27@cantab.net> | 2019-06-15 23:20:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-15 23:20:29 +0100 |
commit | cde410521ce235d1fccbb576a877b129c2da68d4 (patch) | |
tree | d8306f8b936acb52980018e93e8ed90919bbeeeb /models/repo.go | |
parent | 0323122fd79f42296470bdc02dee57a5ef8e72c9 (diff) | |
download | gitea-cde410521ce235d1fccbb576a877b129c2da68d4.tar.gz gitea-cde410521ce235d1fccbb576a877b129c2da68d4.zip |
Only warn on errors in deleting LFS orphaned files during repo deletion (#7213)
Diffstat (limited to 'models/repo.go')
-rw-r--r-- | models/repo.go | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/models/repo.go b/models/repo.go index 8819debd4b..215222e279 100644 --- a/models/repo.go +++ b/models/repo.go @@ -1882,10 +1882,7 @@ func DeleteRepository(doer *User, uid, repoID int64) error { } oidPath := filepath.Join(v.Oid[0:2], v.Oid[2:4], v.Oid[4:len(v.Oid)]) - err = os.Remove(filepath.Join(setting.LFS.ContentPath, oidPath)) - if err != nil { - return err - } + removeAllWithNotice(sess, "Delete orphaned LFS file", oidPath) } if _, err := sess.Delete(&LFSMetaObject{RepositoryID: repoID}); err != nil { |