diff --git a/main.go b/main.go index 1bb8fe1..63363c9 100644 --- a/main.go +++ b/main.go @@ -135,7 +135,8 @@ func indexHandler(w http.ResponseWriter, r *http.Request) { userConf := conf.Wide.GetUser(username) model := map[string]interface{}{"conf": conf.Wide, "i18n": i18n.GetAll(r), "locale": i18n.GetLocale(r), - "session": wideSession, "latestSessionContent": userConf.LatestSessionContent} + "session": wideSession, "latestSessionContent": userConf.LatestSessionContent, + "pathSeparator": conf.PathSeparator} glog.V(3).Infof("User [%s] has [%d] sessions", username, len(wideSessions)) diff --git a/static/js/wide.js b/static/js/wide.js index 9d02b83..5abf039 100644 --- a/static/js/wide.js +++ b/static/js/wide.js @@ -92,7 +92,7 @@ var wide = { var request = newWideRequest(), name = $("#dialogNewFilePrompt > input").val(); - request.path = wide.curNode.path + '\\' + name; + request.path = wide.curNode.path + config.pathSeparator + name; request.fileType = "f"; $.ajax({ @@ -165,7 +165,7 @@ var wide = { var name = $("#dialogNewDirPrompt > input").val(), request = newWideRequest(); - request.path = wide.curNode.path + '\\' + name; + request.path = wide.curNode.path + conf.pathSeparator + name; request.fileType = "d"; $.ajax({ diff --git a/view/index.html b/view/index.html index cf76690..a1bf90b 100644 --- a/view/index.html +++ b/view/index.html @@ -203,7 +203,8 @@