This commit is contained in:
Liang Ding 2015-02-13 14:08:35 +08:00
parent ad4c0cd896
commit 2e1f3e8f38
1 changed files with 2 additions and 7 deletions

View File

@ -67,15 +67,10 @@ func SaveHandler(w http.ResponseWriter, r *http.Request) {
bytes, _ := cmd.Output()
output := string(bytes)
if "" == output {
// format error, returns the original content
data["succ"] = true
data["code"] = code
return
if "" != output {
code = string(output)
}
code = string(output)
data["code"] = code
// Step2. generate file name