# HG changeset patch # User Goffi # Date 1488129627 -3600 # Node ID 1b3fbb76984b6ab8b79b9d0510b4c4b533058c3b # Parent a0fbb2b11fd05793ae7844ef92b238bb9ffec139 core (memory/cache): escape profile when creating cache dir diff -r a0fbb2b11fd0 -r 1b3fbb76984b src/memory/cache.py --- a/src/memory/cache.py Thu Feb 23 07:33:30 2017 +0100 +++ b/src/memory/cache.py Sun Feb 26 18:20:27 2017 +0100 @@ -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 @@ 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)