summaryrefslogtreecommitdiffstats
path: root/models/repo.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2020-09-29 17:05:13 +0800
committerGitHub <noreply@github.com>2020-09-29 12:05:13 +0300
commit3878e985b66cc6d4cb4d2b0e7406d5cf91af6191 (patch)
tree31229c29c2b57041d1941ec28b043165cbe4642d /models/repo.go
parent4c6ac08182b5a14eaaffaafafef160bd90c4ae81 (diff)
downloadgitea-3878e985b66cc6d4cb4d2b0e7406d5cf91af6191.tar.gz
gitea-3878e985b66cc6d4cb4d2b0e7406d5cf91af6191.zip
Add default storage configurations (#12813)
Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: zeripath <art27@cantab.net>
Diffstat (limited to 'models/repo.go')
-rw-r--r--models/repo.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/models/repo.go b/models/repo.go
index 46f91fc7df..a743f65737 100644
--- a/models/repo.go
+++ b/models/repo.go
@@ -1748,8 +1748,7 @@ func DeleteRepository(doer *User, uid, repoID int64) error {
continue
}
- oidPath := filepath.Join(setting.LFS.ContentPath, v.Oid[0:2], v.Oid[2:4], v.Oid[4:len(v.Oid)])
- removeAllWithNotice(sess, "Delete orphaned LFS file", oidPath)
+ removeStorageWithNotice(sess, storage.LFS, "Delete orphaned LFS file", v.RelativePath())
}
if _, err := sess.Delete(&LFSMetaObject{RepositoryID: repoID}); err != nil {