Skip to content

Commit 9ff9f5a

Browse files
zeripathtechknowlogick
authored andcommitted
Ensure that LFS files are relative to the LFS content path (#8455)
1 parent 6551a9d commit 9ff9f5a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Diff for: models/repo.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -1946,12 +1946,11 @@ func DeleteRepository(doer *User, uid, repoID int64) error {
19461946
if err != nil {
19471947
return err
19481948
}
1949-
19501949
if count > 1 {
19511950
continue
19521951
}
19531952

1954-
oidPath := filepath.Join(v.Oid[0:2], v.Oid[2:4], v.Oid[4:len(v.Oid)])
1953+
oidPath := filepath.Join(setting.LFS.ContentPath, v.Oid[0:2], v.Oid[2:4], v.Oid[4:len(v.Oid)])
19551954
removeAllWithNotice(sess, "Delete orphaned LFS file", oidPath)
19561955
}
19571956

0 commit comments

Comments
 (0)