winemenubuilder: Make desktop files executable.
authorDamjan Jovanovic <damjan.jov@gmail.com>
Wed, 5 May 2010 20:53:57 +0000 (22:53 +0200)
committerAlexandre Julliard <julliard@winehq.org>
Thu, 6 May 2010 12:20:58 +0000 (14:20 +0200)
programs/winemenubuilder/winemenubuilder.c

index 201f9acb9c453210d799fcf83d750c933aa71b67..4884d7e26212d9284bd037e31e251c344e4a2ffd 100644 (file)
@@ -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);
         }
     }