Finish the migrate program.

This commit is contained in:
zicla
2019-05-21 03:36:37 +08:00
parent cf847d44d7
commit 7f225bb18e
13 changed files with 368 additions and 83 deletions

View File

@ -195,12 +195,11 @@ func (this *TankRouter) ServeHTTP(writer http.ResponseWriter, request *http.Requ
//static file.
dir := util.GetHtmlPath()
requestURI := request.RequestURI
if requestURI == "" || request.RequestURI == "/" {
requestURI = "index.html"
if path == "" || path == "/" {
path = "index.html"
}
filePath := dir + requestURI
filePath := dir + path
exists := util.PathExists(filePath)
if !exists {
filePath = dir + "/index.html"