- add a workaround to install desktop launchers in 644 mode whatever the

original file mode from the system applications directory is
This commit is contained in:
ajacoutot 2008-11-29 16:14:38 +00:00
parent c7cf88e5cf
commit f05c8158b4
2 changed files with 35 additions and 2 deletions

View File

@ -1,10 +1,10 @@
# $OpenBSD: Makefile,v 1.42 2008/11/26 11:58:40 ajacoutot Exp $
# $OpenBSD: Makefile,v 1.43 2008/11/29 16:14:38 ajacoutot Exp $
COMMENT= GNOME panel
GNOME_PROJECT= gnome-panel
GNOME_VERSION= 2.24.2
PKGNAME= ${DISTNAME}p0
PKGNAME= ${DISTNAME}p1
SHARED_LIBS= panel-applet-2 2.24 # .2.26
CATEGORIES= x11

View File

@ -0,0 +1,33 @@
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);