From 27f5dd80bf507c48fcc181fcb3b6339a1f87fc3e Mon Sep 17 00:00:00 2001 From: Goffi Date: Sun, 26 Feb 2017 18:20:27 +0100 Subject: [PATCH] core (memory/cache): escape profile when creating cache dir --- src/memory/cache.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/memory/cache.py b/src/memory/cache.py index 1f33ca3f..7e93119e 100644 --- a/src/memory/cache.py +++ b/src/memory/cache.py @@ -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)