From d330b2f52b599551b9ede1bc9336b46857c33fdd Mon Sep 17 00:00:00 2001 From: zeripath Date: Fri, 11 Oct 2019 13:41:55 +0100 Subject: [PATCH] Ensure that LFS files are relative to the LFS content path (#8455) (#8458) --- models/repo.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/models/repo.go b/models/repo.go index cde5fbff2d..976e853232 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) }