mirror of https://github.com/go-gitea/gitea.git
fix #659
This commit is contained in:
parent
54d25c13d7
commit
515641d033
|
@ -14,6 +14,7 @@ import (
|
||||||
"runtime"
|
"runtime"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"github.com/Unknwon/com"
|
||||||
"github.com/codegangsta/cli"
|
"github.com/codegangsta/cli"
|
||||||
|
|
||||||
"github.com/gogits/gogs/models"
|
"github.com/gogits/gogs/models"
|
||||||
|
@ -164,11 +165,13 @@ func runFixLocation(ctx *cli.Context) {
|
||||||
|
|
||||||
// Fix in authorized_keys file.
|
// Fix in authorized_keys file.
|
||||||
sshPath := path.Join(models.SshPath, "authorized_keys")
|
sshPath := path.Join(models.SshPath, "authorized_keys")
|
||||||
|
if com.IsFile(sshPath) {
|
||||||
fmt.Printf("Fixing pathes in file: %s\n", sshPath)
|
fmt.Printf("Fixing pathes in file: %s\n", sshPath)
|
||||||
if err := rewriteAuthorizedKeys(sshPath, oldPath, execPath); err != nil {
|
if err := rewriteAuthorizedKeys(sshPath, oldPath, execPath); err != nil {
|
||||||
fmt.Println(err)
|
fmt.Println(err)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Fix position in gogs-repositories.
|
// Fix position in gogs-repositories.
|
||||||
setting.NewConfigContext()
|
setting.NewConfigContext()
|
||||||
|
|
Loading…
Reference in New Issue