mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Allow using Windows path in archive.extracted name attribute, including drive letter colon and backslashes.
This commit is contained in:
parent
2b8f7a12e7
commit
9dcc617a53
1 changed files with 2 additions and 1 deletions
|
@ -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']:
|
||||
|
|
Loading…
Add table
Reference in a new issue