summaryrefslogtreecommitdiffstats
path: root/update.go
diff options
context:
space:
mode:
authorUnknown <joe2010xtmf@163.com>2014-03-30 16:01:50 -0400
committerUnknown <joe2010xtmf@163.com>2014-03-30 16:01:50 -0400
commit2a0066420a9395e5fa5afcd9be4d094a48eee3fa (patch)
tree7529650f4c78f9113ac4d9f7f307a4d92255e6cf /update.go
parentd0e6a4c25acc3414f6d0f93cc50e6dcb41111c19 (diff)
downloadgitea-2a0066420a9395e5fa5afcd9be4d094a48eee3fa.tar.gz
gitea-2a0066420a9395e5fa5afcd9be4d094a48eee3fa.zip
Fix bug work with sqlite3
Diffstat (limited to 'update.go')
-rw-r--r--update.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/update.go b/update.go
index 246c5d8f9d..e36dc22329 100644
--- a/update.go
+++ b/update.go
@@ -32,6 +32,12 @@ gogs serv provide access auth for repositories`,
func runUpdate(c *cli.Context) {
base.NewConfigContext()
models.LoadModelsConfig()
+
+ if models.UseSQLite3 {
+ execDir, _ := base.ExecDir()
+ os.Chdir(execDir)
+ }
+
models.SetEngine()
w, _ := os.Create("update.log")