This commit is contained in:
2023-08-20 17:31:57 +08:00
parent dd86a61c26
commit 385cd4b182
3 changed files with 6 additions and 2 deletions

View File

@@ -97,8 +97,8 @@ 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.Dir = softwarePath
out, err := cmd.CombinedOutput()