This commit is contained in:
		
							parent
							
								
									ad4c0cd896
								
							
						
					
					
						commit
						2e1f3e8f38
					
				| 
						 | 
					@ -67,15 +67,10 @@ func SaveHandler(w http.ResponseWriter, r *http.Request) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	bytes, _ := cmd.Output()
 | 
						bytes, _ := cmd.Output()
 | 
				
			||||||
	output := string(bytes)
 | 
						output := string(bytes)
 | 
				
			||||||
	if "" == output {
 | 
						if "" != output {
 | 
				
			||||||
		// format error, returns the original content
 | 
							code = string(output)
 | 
				
			||||||
		data["succ"] = true
 | 
					 | 
				
			||||||
		data["code"] = code
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
		return
 | 
					 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	code = string(output)
 | 
					 | 
				
			||||||
	data["code"] = code
 | 
						data["code"] = code
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// Step2. generate file name
 | 
						// Step2. generate file name
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue