34 lines
1.0 KiB
Plaintext
34 lines
1.0 KiB
Plaintext
Workaround to install desktop launchers in 644 mode whatever the
|
|
original file mode from the system applications directory is.
|
|
|
|
$OpenBSD: patch-gnome-panel_menu_c,v 1.1 2008/11/29 16:14:38 ajacoutot Exp $
|
|
--- gnome-panel/menu.c.orig Tue Nov 25 14:02:15 2008
|
|
+++ gnome-panel/menu.c Sat Nov 29 17:00:05 2008
|
|
@@ -26,6 +26,9 @@
|
|
|
|
#include <string.h>
|
|
|
|
+#include <glib.h>
|
|
+#include <glib/gstdio.h>
|
|
+
|
|
#include <glib/gi18n.h>
|
|
#include <gio/gio.h>
|
|
#include <gdk/gdkkeysyms.h>
|
|
@@ -725,6 +728,16 @@ add_app_to_desktop (GtkWidget *item,
|
|
error = NULL;
|
|
g_file_copy (source, target, G_FILE_COPY_NONE,
|
|
NULL, NULL, NULL, &error);
|
|
+
|
|
+ /*
|
|
+ This should probably use G_FILE_COPY_TARGET_DEFAULT_PERMS
|
|
+ in previous g_file_copy when glib has it in a stable release.
|
|
+ */
|
|
+ char *target_path;
|
|
+ target_path = g_file_get_path (target);
|
|
+ if (g_chmod(target_path, 0644) != 0)
|
|
+ g_warning ("Cannot give 644 chmod permissions to :%s", target_path);
|
|
+ g_free (target_path);
|
|
|
|
g_object_unref (source);
|
|
g_object_unref (target);
|