core (memory/cache): escape profile when creating cache dir
This commit is contained in:
parent
4a36fba066
commit
27f5dd80bf
1 changed files with 2 additions and 1 deletions
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
from sat.core.log import getLogger
|
||||
log = getLogger(__name__)
|
||||
from sat.tools.common import regex
|
||||
from sat.core import exceptions
|
||||
from sat.core.constants import Const as C
|
||||
import cPickle as pickle
|
||||
|
|
@ -36,7 +37,7 @@ class Cache(object):
|
|||
self.cache_dir = os.path.join(
|
||||
host.memory.getConfig('', 'local_dir'),
|
||||
C.CACHE_DIR,
|
||||
profile or '')
|
||||
regex.pathEscape(profile or ''))
|
||||
if not os.path.exists(self.cache_dir):
|
||||
os.makedirs(self.cache_dir)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue