This commit is contained in:
2023-08-20 17:47:34 +08:00
parent c1509b71a3
commit 454e66f0c7
2 changed files with 2 additions and 2 deletions

View File

@@ -99,7 +99,7 @@ func UploadSoftwareFile(w http.ResponseWriter, r *http.Request) {
filePrefix := fileName[:strings.Index(fileName, ".zip")]
filePath := fmt.Sprintf("%s/%s", softwarePath, fileName)
log.Debugf("filePath:%s filePrefix:%s softwarePath:%s", filePath, filePrefix, softwarePath)
cmd := exec.Command("unzip", "-f", filePath)
cmd := exec.Command("unzip", "-o", filePath)
cmd.Dir = softwarePath
out, err := cmd.CombinedOutput()
log.Debugf("Exec outpout:%s", string(out))