From: vsr Date: Mon, 19 Jan 2015 14:35:35 +0000 (+0300) Subject: Fix small bug introduced with commit 485e5e1d X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=5f53503a9970bff9c2bd56b4476c043eb3a19274;p=modules%2Fyacs.git Fix small bug introduced with commit 485e5e1d --- diff --git a/bin/launchConfigureParser.py b/bin/launchConfigureParser.py index 99db4a7cd..647e99230 100755 --- a/bin/launchConfigureParser.py +++ b/bin/launchConfigureParser.py @@ -197,16 +197,19 @@ def userFile(appname, cfgname): if not id0: return None # bad version id -> can't detect appropriate file # ... get all existing user preferences files - filetmpl = sys.platform == "win32" and "{0}.xml.*" or "{0}rc.*" + filetmpl1 = sys.platform == "win32" and "{0}.xml.*" or "{0}rc.*" + filetmpl2 = sys.platform == "win32" and filetmpl1 or "." + filetmpl1 files = [] if cfgname: # Since v6.6.0 - in ~/.config/salome directory, without dot prefix - files += glob.glob(os.path.join(getHomeDir(), ".config", cfgname, filetmpl.format(appname))) - # Since v6.5.0 - in ~/.config/salome directory, dot-prefixed (backward compatibility) - files += glob.glob(os.path.join(getHomeDir(), ".config", cfgname, filetmpl.format(appname))) + files += glob.glob(os.path.join(getHomeDir(), ".config", cfgname, filetmpl1.format(appname))) + # Since v6.5.0 - in ~/.config/salome directory, dot-prefixed (backward compatibility) + if filetmpl2 and filetmpl2 != filetmpl1: + files += glob.glob(os.path.join(getHomeDir(), ".config", cfgname, filetmpl2.format(appname))) pass # old style (before v6.5.0) - in ~ directory, dot-prefixed - files += glob.glob(os.path.join(getHomeDir(), filetmpl.format(appname))) + if filetmpl2 and filetmpl2 != filetmpl1: + files += glob.glob(os.path.join(getHomeDir(), filetmpl2.format(appname))) pass # ... loop through all files and find most appopriate file (with closest id)