Don't clean up hardcoded tmp (#18983)

* Don't clean up hardcoded `tmp`.

* Fixed import.
This commit is contained in:
KN4CK3R 2022-03-02 23:50:29 +01:00 committed by GitHub
parent efd10f1ab4
commit f3cbdee38e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

View file

@ -10,7 +10,6 @@ import (
"fmt"
"os"
"path"
"path/filepath"
"sort"
"strconv"
"strings"
@ -123,7 +122,8 @@ func NewRepoContext() {
loadRepoConfig()
unit.LoadUnitConfig()
admin_model.RemoveAllWithNotice(db.DefaultContext, "Clean up repository temporary data", filepath.Join(setting.AppDataPath, "tmp"))
admin_model.RemoveAllWithNotice(db.DefaultContext, "Clean up temporary repository uploads", setting.Repository.Upload.TempPath)
admin_model.RemoveAllWithNotice(db.DefaultContext, "Clean up temporary repositories", LocalCopyPath())
}
// CheckRepoUnitUser check whether user could visit the unit of this repository