Skip to content

Commit d330b2f

Browse files
authored
Ensure that LFS files are relative to the LFS content path (#8455) (#8458)
1 parent 6ab1d5a commit d330b2f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

models/repo.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -1895,12 +1895,11 @@ func DeleteRepository(doer *User, uid, repoID int64) error {
18951895
if err != nil {
18961896
return err
18971897
}
1898-
18991898
if count > 1 {
19001899
continue
19011900
}
19021901

1903-
oidPath := filepath.Join(v.Oid[0:2], v.Oid[2:4], v.Oid[4:len(v.Oid)])
1902+
oidPath := filepath.Join(setting.LFS.ContentPath, v.Oid[0:2], v.Oid[2:4], v.Oid[4:len(v.Oid)])
19041903
removeAllWithNotice(sess, "Delete orphaned LFS file", oidPath)
19051904
}
19061905

0 commit comments

Comments
 (0)