File tree Expand file tree Collapse file tree 3 files changed +1
-10
lines changed Expand file tree Collapse file tree 3 files changed +1
-10
lines changed Original file line number Diff line number Diff line change @@ -24,12 +24,6 @@ func localCopyPath() string {
2424 return setting .Repository .Local .LocalCopyPath
2525}
2626
27- func CleanUpTemporaryPaths () {
28- if err := util .RemoveAll (localCopyPath ()); err != nil {
29- log .Error ("Unable to remove local repository temporary copy path: %s (%v)" , localCopyPath (), err )
30- }
31- }
32-
3327// CreateTemporaryPath creates a temporary path
3428func CreateTemporaryPath (prefix string ) (string , context.CancelFunc , error ) {
3529 if err := os .MkdirAll (localCopyPath (), os .ModePerm ); err != nil {
Original file line number Diff line number Diff line change @@ -101,8 +101,7 @@ func Init(ctx context.Context) error {
101101 if err := repo_module .LoadRepoConfig (); err != nil {
102102 return err
103103 }
104- system_model .RemoveAllWithNotice (ctx , "Clean up temporary repository uploads" , setting .Repository .Upload .TempPath )
105- repo_module .CleanUpTemporaryPaths ()
104+
106105 if err := system_model .CreateNotice (db .DefaultContext , system_model .NoticeRepository , "Clean up temporary repositories" ); err != nil {
107106 log .Error ("CreateRepositoryNotice: %v" , err )
108107 }
Original file line number Diff line number Diff line change @@ -18,7 +18,6 @@ import (
1818 "code.gitea.io/gitea/modules/git"
1919 "code.gitea.io/gitea/modules/graceful"
2020 "code.gitea.io/gitea/modules/log"
21- repo_module "code.gitea.io/gitea/modules/repository"
2221 "code.gitea.io/gitea/modules/setting"
2322 "code.gitea.io/gitea/modules/storage"
2423 "code.gitea.io/gitea/modules/test"
@@ -69,7 +68,6 @@ func InitTest(requireGitea bool) {
6968
7069 unittest .InitSettings ()
7170 setting .Repository .DefaultBranch = "master" // many test code still assume that default branch is called "master"
72- repo_module .CleanUpTemporaryPaths ()
7371
7472 if err := git .InitFull (context .Background ()); err != nil {
7573 log .Fatal ("git.InitOnceWithSync: %v" , err )
You can’t perform that action at this time.
0 commit comments