Merge pull request #758 from midoks/dev

Update file.py
This commit is contained in:
Mr Chen
2025-06-12 15:40:50 +08:00
committed by GitHub
+4 -2
View File
@@ -123,7 +123,8 @@ def unzip(sfile, dfile, stype, path):
mw.execShell("cd " + path + " && tar -zxvf " + sfiles +" -C " + dfile + " > " + tmps + " 2>&1 &")
if os.path.exists(dfile):
setFileAccept(dfile)
if dfile.startswith("/www"):
setFileAccept(dfile)
mw.writeLog("文件管理", '文件[{1}]解压[{2}]成功!', (sfile, dfile))
return mw.returnData(True, '文件解压成功!')
except:
@@ -175,7 +176,8 @@ def uncompress(sfile, dfile, path):
mw.execShell(cmd)
if os.path.exists(dfile):
setFileAccept(dfile)
if dfile.startswith("/www"):
setFileAccept(dfile)
mw.writeLog("文件管理", '文件[{1}]解压[{2}]成功!', (sfile, dfile,))
return mw.returnData(True, '文件解压成功!')
except Exception as e: