diff options
author | KN4CK3R <admin@oldschoolhack.me> | 2022-03-02 23:50:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-02 23:50:29 +0100 |
commit | f3cbdee38e5111886a8ab0855be615ba180c45dc (patch) | |
tree | a33fa928fc66a1151db66346d026ec0e62dd4731 /models | |
parent | efd10f1ab4bd66ef8e583ff8f9d3d25f7f741a6a (diff) | |
download | gitea-f3cbdee38e5111886a8ab0855be615ba180c45dc.tar.gz gitea-f3cbdee38e5111886a8ab0855be615ba180c45dc.zip |
Don't clean up hardcoded `tmp` (#18983)
* Don't clean up hardcoded `tmp`.
* Fixed import.
Diffstat (limited to 'models')
-rw-r--r-- | models/repo.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/models/repo.go b/models/repo.go index 02e1a33253..821b60d08d 100644 --- a/models/repo.go +++ b/models/repo.go @@ -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 |