1
0
mirror of https://github.com/gryf/fs-uae-wrapper.git synced 2025-12-22 05:48:07 +01:00

Fix for archives like .tar.bz2

This commit is contained in:
2017-01-02 14:05:34 +01:00
parent 77dd4dfaf4
commit 230ec154b6
2 changed files with 11 additions and 0 deletions

View File

@@ -4,6 +4,7 @@ File archive classes
import os
import subprocess
import sys
import re
class Archive(object):
@@ -125,6 +126,11 @@ def get_archiver(arch_name):
"""Return right class for provided archive file name"""
_, ext = os.path.splitext(arch_name)
re_tar = re.compile('.*([tT][aA][rR].[^.]+$)')
result = re_tar.match(arch_name)
if result:
ext = result.groups[0]
archivers = {'.tar': TarArchive,
'.tgz': TarGzipArchive,