Globals/__init__.py

changeset 6303
ec9ebaf206fb
parent 6289
f481df37413c
child 6345
b41a239a4949
--- a/Globals/__init__.py	Mon May 21 22:16:21 2018 +0200
+++ b/Globals/__init__.py	Wed May 23 19:36:11 2018 +0200
@@ -164,11 +164,15 @@
     if configDir is not None and os.path.exists(configDir):
         hp = configDir
     else:
+        cdn = ".eric6"
         if isWindowsPlatform():
-            cdn = "_eric6"
-        else:
-            cdn = ".eric6"
-            
+            # migrate the old config directory (< v18.06)
+            cdnOld = "_eric6"
+            hpOld = os.path.join(os.path.expanduser("~"), cdnOld)
+            if os.path.exists(hpOld):
+                hpNew = os.path.join(os.path.expanduser("~"), cdn)
+                os.rename(hpOld, hpNew)
+        
         hp = os.path.join(os.path.expanduser("~"), cdn)
         if not os.path.exists(hp):
             os.mkdir(hp)

eric ide

mercurial