This commit is contained in:
parent
9be8211280
commit
e5470481f4
|
@ -168,12 +168,14 @@ func NewFile(w http.ResponseWriter, r *http.Request) {
|
||||||
fileType := args["fileType"].(string)
|
fileType := args["fileType"].(string)
|
||||||
|
|
||||||
if !createFile(path, fileType) {
|
if !createFile(path, fileType) {
|
||||||
|
data["succ"] = false
|
||||||
|
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if "f" == fileType {
|
if "f" == fileType {
|
||||||
extension := filepath.Ext(path)
|
extension := filepath.Ext(path)
|
||||||
data["mode"] = getEditorMode(extension)
|
data["mode"] = getEditorMode(extension)
|
||||||
|
|
||||||
}
|
|
||||||
data["succ"] = false
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue