From: Nabil Ghodbane Date: Mon, 15 Jul 2019 12:34:21 +0000 (+0200) Subject: scs #13189: oubli report X-Git-Tag: 5.5.0~46^2~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=71a3e8316f5bb04b849d184e3ac27cabe6d4e162;p=tools%2Fsat.git scs #13189: oubli report --- diff --git a/src/fileEnviron.py b/src/fileEnviron.py index 468b0e8..851b7c9 100644 --- a/src/fileEnviron.py +++ b/src/fileEnviron.py @@ -615,8 +615,18 @@ class LauncherFileEnviron: :param value str: the value to prepend to key :param sep str: the separator string """ - for c in [";", ":"]: # windows or linux path separators - if c in value: + separators = [] + if src.architecture.is_windows(): + separators = [':'] + else: + separators = [';'] + for c in separators: # windows or linux path separators + isOK = True + if c in value and not src.architecture.is_windows(): + isOK = False + elif c in value and src.architecture.is_windows() and value.count(':') > 1: + isOK = False + if not isOK: raise Exception("LauncherFileEnviron prepend key '%s' value '%s' contains forbidden character '%s'" % (key, value, c)) if self.is_defined(key) : self.add(key, value)