Fixed an issue getting the home directory during uninstallation.

Tue, 01 Aug 2017 15:49:41 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Tue, 01 Aug 2017 15:49:41 +0200
changeset 5823
70dfe6a4aa03
parent 5822
c61cd6803da2
child 5824
a8ef49c858dc

Fixed an issue getting the home directory during uninstallation.

Globals/__init__.py file | annotate | diff | comparison | revisions
install-i18n.py file | annotate | diff | comparison | revisions
uninstall.py file | annotate | diff | comparison | revisions
--- a/Globals/__init__.py	Fri Jul 28 19:20:41 2017 +0200
+++ b/Globals/__init__.py	Tue Aug 01 15:49:41 2017 +0200
@@ -141,11 +141,10 @@
         else:
             cdn = ".eric6"
             
-        hp = QDir.homePath()
-        dn = QDir(hp)
-        dn.mkdir(cdn)
-        hp += "/" + cdn
-    return QDir.toNativeSeparators(hp)
+        hp = os.path.join(os.path.expanduser("~"), cdn)
+        if not os.path.exists(hp):
+            os.mkdir(hp)
+    return hp
 
 
 def setConfigDir(d):
--- a/install-i18n.py	Fri Jul 28 19:20:41 2017 +0200
+++ b/install-i18n.py	Tue Aug 01 15:49:41 2017 +0200
@@ -34,8 +34,7 @@
     else:
         cdn = ".eric6"
         
-    hp = os.path.expanduser("~")
-    hp = os.path.join(hp, cdn)
+    hp = os.path.join(os.path.expanduser("~"), cdn)
     if not os.path.exists(hp):
         os.mkdir(hp)
     return hp
--- a/uninstall.py	Fri Jul 28 19:20:41 2017 +0200
+++ b/uninstall.py	Tue Aug 01 15:49:41 2017 +0200
@@ -314,11 +314,9 @@
     """
     if sys.platform.startswith("win"):
         cdn = "_eric6"
-        return os.path.join(os.path.expanduser("~"), cdn)
     else:
         cdn = ".eric6"
-        return os.path.join(
-            os.path.expanduser("~{0}".format(os.getlogin())), cdn)
+    return os.path.join(os.path.expanduser("~"), cdn)
 
 
 def main(argv):

eric ide

mercurial