if self.match_ext(archive, '.tar.gz', '.tgz'):
cmd, args = 'tar', ['cvzf', archive, '-C', path] + files
elif self.match_ext(archive, '.tar.bz2', '.tbz'):
if self.match_ext(archive, '.tar.gz', '.tgz'):
cmd, args = 'tar', ['cvzf', archive, '-C', path] + files
elif self.match_ext(archive, '.tar.bz2', '.tbz'):