Skip to content

Commit 575723b

Browse files
committed
update
1 parent 50a000f commit 575723b

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

web/static/app/files.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1360,6 +1360,7 @@ function zip(dirName,submits) {
13601360
<option value="rar">rar (WinRAR对中文兼容较好)</option>\
13611361
<option value="7z">7z (压缩率极高的压缩格式)</option>\
13621362
<option value="xz">xz (压缩率极高的压缩格式)</option>\
1363+
<option value="bz2">bz2 (压缩率极高的压缩格式)</option>\
13631364
</select>\
13641365
</div>\
13651366
</div>'
@@ -1397,6 +1398,8 @@ function zip(dirName,submits) {
13971398
$("#dfile").val(newPathName + '.7z');
13981399
} else if (z_type == 'xz') {
13991400
$("#dfile").val(newPathName + '.xz');
1401+
} else if (z_type == 'bz2') {
1402+
$("#dfile").val(newPathName + '.tar.bz2');
14001403
}
14011404
});
14021405

web/utils/file.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,9 @@ def uncompress(sfile, dfile, path):
177177
elif extension == 'xz':
178178
cmd += "&& tar -Jxvf " + sfile + " -C " + dfile + " > " + tmps + " 2>&1 &"
179179
mw.execShell(cmd)
180+
elif extension == 'bz2':
181+
cmd += "&& tar -xjvf " + sfile + " -C " + dfile + " > " + tmps + " 2>&1 &"
182+
mw.execShell(cmd)
180183

181184
if os.path.exists(dfile):
182185
if dfile.startswith("/www/wwwroot"):

0 commit comments

Comments
 (0)