Skip to content

Commit

Permalink
Ensure that LFS files are relative to the LFS content path (#8455)
Browse files Browse the repository at this point in the history
  • Loading branch information
zeripath authored and techknowlogick committed Oct 10, 2019
1 parent 6551a9d commit 9ff9f5a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions models/repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -1946,12 +1946,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)
}

Expand Down

0 comments on commit 9ff9f5a

Please sign in to comment.