Merge pull request #31042 from moltob/fix-archive-winpath

Allow using Windows path in archive.extracted name attribute
This commit is contained in:
Mike Place 2016-02-09 10:47:20 -07:00
commit 8518655bfb

View file

@ -7,6 +7,7 @@ Extract an archive
# Import Python libs
from __future__ import absolute_import
import re
import os
import logging
import tarfile
@ -168,7 +169,7 @@ def extracted(name,
filename = os.path.join(__opts__['cachedir'],
'files',
__env__,
'{0}.{1}'.format(if_missing.replace('/', '_'),
'{0}.{1}'.format(re.sub('[:/\\\\]', '_', if_missing),
archive_format))
if not os.path.exists(filename):
if __opts__['test']: