aboutsummaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2019-10-10 22:08:33 +0100
committertechknowlogick <techknowlogick@gitea.io>2019-10-10 17:08:33 -0400
commit9ff9f5ad1d8d2680c9c146831458afdbd4e641df (patch)
tree4a9289c765b14596231ff9a3d6e9e25bd807848f /models
parent6551a9d6ca8ab79fe1460eb9d60a5a0e76110eb3 (diff)
downloadgitea-9ff9f5ad1d8d2680c9c146831458afdbd4e641df.tar.gz
gitea-9ff9f5ad1d8d2680c9c146831458afdbd4e641df.zip
Ensure that LFS files are relative to the LFS content path (#8455)
Diffstat (limited to 'models')
-rw-r--r--models/repo.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/models/repo.go b/models/repo.go
index 8b3784bae0..50402c8e1a 100644
--- a/models/repo.go
+++ b/models/repo.go
@@ -1946,12 +1946,11 @@ func DeleteRepository(doer *User, uid, repoID int64) error {
if err != nil {
return err
}
-
if count > 1 {
continue
}
- oidPath := filepath.Join(v.Oid[0:2], v.Oid[2:4], v.Oid[4:len(v.Oid)])
+ 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)
}