]> glassweightruler.freedombox.rocks Git - waydroid.git/commitdiff
user_manager: Restore desktop-file creation the first time
authorAlessandro Astone <ales.astone@gmail.com>
Sun, 28 Jul 2024 08:19:31 +0000 (10:19 +0200)
committerAlessandro Astone <ales.astone@gmail.com>
Sun, 28 Jul 2024 08:19:31 +0000 (10:19 +0200)
tools/services/user_manager.py

index 83a50cca58cb863d33c30d3a490a859527a0acfe..dbde361536a9ad8cb2a83657e9af350b8d97391a 100644 (file)
@@ -50,7 +50,7 @@ Icon={waydroid_data}/icons/com.android.settings.png
     def makeWaydroidDesktopFile(hide):
         desktop_file_path = apps_dir + "/Waydroid.desktop"
         # If the user has set the desktop file as read-only, we won't replace it
     def makeWaydroidDesktopFile(hide):
         desktop_file_path = apps_dir + "/Waydroid.desktop"
         # If the user has set the desktop file as read-only, we won't replace it
-        if not os.access(desktop_file_path, os.W_OK):
+        if os.path.isfile(desktop_file_path) and not os.access(desktop_file_path, os.W_OK):
             logging.info(f"Desktop file '{desktop_file_path}' is not writeable, not updating it")
         else:
             if os.path.isfile(desktop_file_path):
             logging.info(f"Desktop file '{desktop_file_path}' is not writeable, not updating it")
         else:
             if os.path.isfile(desktop_file_path):