install.py

branch
5_5_x
changeset 3752
b269d3e5f310
parent 3725
540b1f7b25b5
child 3900
8c12501b6b48
diff -r 3882b6c32713 -r b269d3e5f310 install.py
--- a/install.py	Wed Aug 06 18:54:06 2014 +0200
+++ b/install.py	Sat Aug 09 12:23:18 2014 +0200
@@ -405,7 +405,7 @@
     global pyModDir, progLanguages
     
     # Remove the menu entry for Linux systems
-    if sys.platform.startswith("linux"):
+    if sys.platform.startswith("linux") and os.getuid() == 0:
         for name in ["/usr/share/pixmaps/eric.png",
                      "/usr/share/applications/eric5.desktop",
                      "/usr/share/appdata/eric5.appdata.xml",
@@ -726,7 +726,7 @@
             if not os.path.exists(dst):
                 os.makedirs(dst)
             shutilCopy(os.path.join(sourceDir, "eric5.appdata.xml"), dst)
-        else:
+        elif os.getuid() == 0:
             shutilCopy(os.path.join(
                 sourceDir, "icons", "default", "eric.png"),
                 "/usr/share/pixmaps/eric.png")

eric ide

mercurial