We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 11ad296 commit d9bdf7aCopy full SHA for d9bdf7a
models/migrations/v21.go
@@ -11,6 +11,7 @@ import (
11
12
"code.gitea.io/gitea/modules/setting"
13
14
+ "github.com/Unknwon/com"
15
"github.com/go-xorm/xorm"
16
)
17
@@ -21,6 +22,10 @@ const (
21
22
23
func useNewPublickeyFormat(x *xorm.Engine) error {
24
fpath := filepath.Join(setting.SSH.RootPath, "authorized_keys")
25
+ if !com.IsExist(fpath) {
26
+ return nil
27
+ }
28
+
29
tmpPath := fpath + ".tmp"
30
f, err := os.OpenFile(tmpPath, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0600)
31
if err != nil {
0 commit comments