Browse Source

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

tags/v1.21.12.1
zeripath techknowlogick 6 years ago
parent
commit
9ff9f5ad1d
1 changed files with 1 additions and 2 deletions
  1. +1
    -2
      models/repo.go

+ 1
- 2
models/repo.go View File

@@ -1946,12 +1946,11 @@ func DeleteRepository(doer *User, uid, repoID int64) error {
if err != nil { if err != nil {
return err return err
} }

if count > 1 { if count > 1 {
continue 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) removeAllWithNotice(sess, "Delete orphaned LFS file", oidPath)
} }




Loading…
Cancel
Save