From 5f53503a9970bff9c2bd56b4476c043eb3a19274 Mon Sep 17 00:00:00 2001 From: vsr Date: Mon, 19 Jan 2015 17:35:35 +0300 Subject: [PATCH] Fix small bug introduced with commit 485e5e1d --- bin/launchConfigureParser.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) 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) -- 2.39.2