File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -311,7 +311,10 @@ def _decompress(fname):
311
311
312
312
def _uncompress_file_zip (filepath ):
313
313
with zipfile .ZipFile (filepath , 'r' ) as files :
314
- file_list = files .namelist ()
314
+ file_list_tmp = files .namelist ()
315
+ file_list = []
316
+ for file in file_list_tmp :
317
+ file_list .append (file .replace ("../" , "" ))
315
318
316
319
file_dir = os .path .dirname (filepath )
317
320
@@ -340,7 +343,10 @@ def _uncompress_file_zip(filepath):
340
343
341
344
def _uncompress_file_tar (filepath , mode = "r:*" ):
342
345
with tarfile .open (filepath , mode ) as files :
343
- file_list = files .getnames ()
346
+ file_list_tmp = files .getnames ()
347
+ file_list = []
348
+ for file in file_list_tmp :
349
+ file_list .append (file .replace ("../" , "" ))
344
350
345
351
file_dir = os .path .dirname (filepath )
346
352
You can’t perform that action at this time.
0 commit comments