mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #31042 from moltob/fix-archive-winpath
Allow using Windows path in archive.extracted name attribute
This commit is contained in:
commit
8518655bfb
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