File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ import (
1717)
1818
1919func testRun (m * testing.M ) error {
20- gitHomePath , err := os .MkdirTemp (os .TempDir (), "git-home" )
20+ gitHomePath , err := os .MkdirTemp (setting .TempDir (), "git-home" )
2121 if err != nil {
2222 return fmt .Errorf ("unable to create temp dir: %w" , err )
2323 }
Original file line number Diff line number Diff line change @@ -23,12 +23,13 @@ var (
2323 // AppName is the Application name, used in the page title. ini: "APP_NAME"
2424 AppName string
2525
26+ tempDir string
2627 createTempOnce sync.Once
2728)
2829
2930// TempDir returns the OS temp directory
3031func TempDir () string {
31- tempDir : = filepath .Join (os .TempDir (), "gitea" )
32+ tempDir = filepath .Join (os .TempDir (), "gitea" )
3233 createTempOnce .Do (func () {
3334 if err := os .MkdirAll (tempDir , os .ModePerm ); err != nil {
3435 log .Fatalf ("Failed to create temp directory %s: %v" , tempDir , err )
@@ -38,5 +39,5 @@ func TempDir() string {
3839}
3940
4041func CleanUpTempDirs () {
41- _ = os .RemoveAll (TempDir ())
42+ // _ = os.RemoveAll(TempDir())
4243}
You can’t perform that action at this time.
0 commit comments