diff --git a/web/utils/file.py b/web/utils/file.py index 694301892..5f3315c46 100644 --- a/web/utils/file.py +++ b/web/utils/file.py @@ -309,6 +309,8 @@ def zip(sfile, dfile, stype, path): elif stype == 'tar_gz': mw.execShell("cd '" + path + "' && tar -zcvf '" + dfile + "' " + sfile + " > " + tmps + " 2>&1") elif stype == 'xz': + if not mw.checkBinExist('xz'): + return mw.returnData(False, 'xz压缩命令不存在,请安装!') cmd = "cd '" + path + "' && tar -cvf '" + dfile + ".tar' " + sfile + " && xz -z '" + dfile + "' > " + tmps + " 2>&1" mw.execShell(cmd) elif stype == 'rar':