Ensure that LFS files are relative to the LFS content path (#8455) (#8458)

This commit is contained in:
zeripath 2019-10-11 13:41:55 +01:00 committed by GitHub
parent 6ab1d5a8a0
commit d330b2f52b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)
}