This commit is contained in:
Liang Ding 2014-09-22 14:20:17 +08:00
parent 9be8211280
commit e5470481f4
1 changed files with 7 additions and 5 deletions

View File

@ -168,12 +168,14 @@ func NewFile(w http.ResponseWriter, r *http.Request) {
fileType := args["fileType"].(string)
if !createFile(path, fileType) {
data["succ"] = false
return
}
if "f" == fileType {
extension := filepath.Ext(path)
data["mode"] = getEditorMode(extension)
}
data["succ"] = false
}
}