Skip to content

Commit d41d8b8

Browse files
committed
Remove cleanup temp dirs
1 parent 1fd7611 commit d41d8b8

File tree

7 files changed

+1
-10
lines changed

7 files changed

+1
-10
lines changed

cmd/web.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,6 @@ func serveInstall(ctx *cli.Context) error {
166166
func serveInstalled(ctx *cli.Context) error {
167167
setting.InitCfgProvider(setting.CustomConf)
168168
setting.LoadCommonSettings()
169-
setting.CleanUpTempDirs()
170169
setting.MustInstalled()
171170

172171
showWebStartupMessage("Prepare to run web server")

models/unittest/testdb.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ func InitSettings() {
5151
}
5252
setting.InitCfgProvider(setting.CustomConf)
5353
setting.LoadCommonSettings()
54-
setting.CleanUpTempDirs()
5554

5655
if err := setting.PrepareAppDataPath(); err != nil {
5756
log.Fatal("Can not prepare APP_DATA_PATH: %v", err)

modules/base/tool_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ func TestVerifyTimeLimitCode(t *testing.T) {
5454
JWT_SECRET = %s
5555
`, secret))
5656
setting.LoadCommonSettings()
57-
setting.CleanUpTempDirs()
5857
}
5958

6059
initGeneralSecret("KZb_QLUd4fYVyxetjxC4eZkrBgWM2SndOOWDNtgUUko")

modules/repository/temp.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ func localCopyPath() string {
2121
} else if !filepath.IsAbs(setting.Repository.Local.LocalCopyPath) {
2222
return filepath.Join(setting.TempDir(), setting.Repository.Local.LocalCopyPath)
2323
}
24-
return filepath.Join(setting.AppDataPath, setting.Repository.Local.LocalCopyPath)
24+
return setting.Repository.Local.LocalCopyPath
2525
}
2626

2727
// CreateTemporaryPath creates a temporary path

modules/setting/global.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,3 @@ func TempDir() string {
3737
})
3838
return tempDir
3939
}
40-
41-
func CleanUpTempDirs() {
42-
//_ = os.RemoveAll(TempDir())
43-
}

modules/setting/path.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ func (s *stringWithDefault) Set(v string) {
9191
func InitWorkPathAndCommonConfig(getEnvFn func(name string) string, args ArgWorkPathAndCustomConf) {
9292
InitWorkPathAndCfgProvider(getEnvFn, args)
9393
LoadCommonSettings()
94-
CleanUpTempDirs()
9594
}
9695

9796
// InitWorkPathAndCfgProvider will set AppWorkPath, CustomPath and CustomConf, init default config provider by CustomConf

routers/install/install.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,6 @@ func SubmitInstall(ctx *context.Context) {
530530
// Reload settings (and re-initialize database connection)
531531
setting.InitCfgProvider(setting.CustomConf)
532532
setting.LoadCommonSettings()
533-
setting.CleanUpTempDirs()
534533
setting.MustInstalled()
535534
setting.LoadDBSetting()
536535
if err := common.InitDBEngine(ctx); err != nil {

0 commit comments

Comments
 (0)