Skip to content

Commit c2fab24

Browse files
committed
fix
1 parent c105798 commit c2fab24

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

modules/appstate/file.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"io/fs"
99
"io/ioutil"
1010
"os"
11-
"path"
11+
"path/filepath"
1212

1313
"code.gitea.io/gitea/modules/json"
1414
)
@@ -19,7 +19,7 @@ type FileStore struct {
1919
}
2020

2121
func (f *FileStore) genFilePath(item StateItem) string {
22-
return path.Join(f.path, item.Name())
22+
return filepath.Join(f.path, item.Name())
2323
}
2424

2525
// Get reads the state item

modules/setting/appstate.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
package setting
66

77
import (
8-
"path"
8+
"path/filepath"
99

1010
"code.gitea.io/gitea/modules/appstate"
1111
"code.gitea.io/gitea/modules/log"
@@ -16,7 +16,7 @@ var AppState appstate.StateStore
1616

1717
func newAppState() {
1818
var err error
19-
appStatePath := path.Join(AppDataPath, "appstate")
19+
appStatePath := filepath.Join(AppDataPath, "appstate")
2020
AppState, err = appstate.NewFileStore(appStatePath)
2121
if err != nil {
2222
log.Fatal("failed to init AppState, err = %v", err)

0 commit comments

Comments
 (0)