aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzeripath2019-10-11 13:41:55 +0100
committerGitHub2019-10-11 13:41:55 +0100
commitd330b2f52b599551b9ede1bc9336b46857c33fdd (patch)
tree14f9afe553a99ac62b95668b314eadd479dcdc1c
parent6ab1d5a8a0ddef8a6e4c5561498ff136e5ebf30e (diff)
Ensure that LFS files are relative to the LFS content path (#8455) (#8458)
-rw-r--r--models/repo.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/models/repo.go b/models/repo.go
index cde5fbff2..976e85323 100644
--- a/models/repo.go
+++ b/models/repo.go
@@ -1895,12 +1895,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)
}