From f2c263c54facdcbc9375a47535c0389fd7d05875 Mon Sep 17 00:00:00 2001
From: Unknwon <joe2010xtmf@163.com>
Date: Mon, 25 Aug 2014 09:45:39 +0800
Subject: [PATCH] fix #367

---
 gogs.go                    | 2 +-
 modules/setting/setting.go | 5 ++++-
 templates/.VERSION         | 2 +-
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/gogs.go b/gogs.go
index 5c93ae26d54..bdd19cfffee 100644
--- a/gogs.go
+++ b/gogs.go
@@ -17,7 +17,7 @@ import (
 	"github.com/gogits/gogs/modules/setting"
 )
 
-const APP_VER = "0.4.7.0824 Alpha"
+const APP_VER = "0.4.7.0825 Alpha"
 
 func init() {
 	runtime.GOMAXPROCS(runtime.NumCPU())
diff --git a/modules/setting/setting.go b/modules/setting/setting.go
index 0cf1a789309..deb16518957 100644
--- a/modules/setting/setting.go
+++ b/modules/setting/setting.go
@@ -156,7 +156,10 @@ func NewConfigContext() {
 
 	AppName = Cfg.MustValue("", "APP_NAME", "Gogs: Go Git Service")
 	AppLogo = Cfg.MustValue("", "APP_LOGO", "img/favicon.png")
-	AppUrl = Cfg.MustValue("server", "ROOT_URL", "http://localhost:3000")
+	AppUrl = Cfg.MustValue("server", "ROOT_URL", "http://localhost:3000/")
+	if AppUrl[len(AppUrl)-1] != '/' {
+		AppUrl += "/"
+	}
 
 	Protocol = HTTP
 	if Cfg.MustValue("server", "PROTOCOL") == "https" {
diff --git a/templates/.VERSION b/templates/.VERSION
index 3e68f858b55..f4c20dee1e2 100644
--- a/templates/.VERSION
+++ b/templates/.VERSION
@@ -1 +1 @@
-0.4.7.0824 Alpha
\ No newline at end of file
+0.4.7.0825 Alpha
\ No newline at end of file