winemenubuilder: make desktop files executable

Damjan Jovanovic damjan.jov at gmail.com
Wed May 5 15:53:57 CDT 2010


Changelog:
* winemenubuilder: make desktop files executable

Desktops now don't allow double-clicking non-executable .desktop files
in ~/Desktop, so make the ones we generate executable.

Damjan Jovanovic
-------------- next part --------------
diff --git a/programs/winemenubuilder/winemenubuilder.c b/programs/winemenubuilder/winemenubuilder.c
index 201f9ac..4884d7e 100644
--- a/programs/winemenubuilder/winemenubuilder.c
+++ b/programs/winemenubuilder/winemenubuilder.c
@@ -2334,6 +2334,8 @@ static BOOL InvokeShellLinker( IShellLinkW *sl, LPCWSTR link, BOOL bWait )
         if (location)
         {
             r = !write_desktop_entry(NULL, location, lastEntry, escaped_path, escaped_args, escaped_description, work_dir, icon_name);
+            if (r == 0)
+                chmod(location, 0755);
             HeapFree(GetProcessHeap(), 0, location);
         }
     }
@@ -2425,6 +2427,8 @@ static BOOL InvokeShellLinkerForURL( IUniformResourceLocatorW *url, LPCWSTR link
         if (location)
         {
             r = !write_desktop_entry(NULL, location, lastEntry, "winebrowser", escaped_urlPath, NULL, NULL, NULL);
+            if (r == 0)
+                chmod(location, 0755);
             HeapFree(GetProcessHeap(), 0, location);
         }
     }


More information about the wine-patches mailing list