openbsd-ports/devel/desktop-file-utils/patches/patch-src_update-desktop-database_c
2007-10-21 18:05:11 +00:00

30 lines
1.0 KiB
Plaintext

$OpenBSD: patch-src_update-desktop-database_c,v 1.3 2007/10/21 18:05:11 jasper Exp $
--- src/update-desktop-database.c.orig Tue Apr 18 16:08:10 2006
+++ src/update-desktop-database.c Fri Oct 19 15:21:36 2007
@@ -34,6 +34,7 @@
#include <glib/gi18n.h>
#define NAME "update-desktop-database"
+#define DB_DIR "/var/db/gnome/applications/"
#define CACHE_FILENAME "mimeinfo.cache"
#define TEMP_CACHE_FILENAME_PREFIX ".mimeinfo.cache.XXXXXX"
@@ -305,7 +306,7 @@ open_temp_cache_file (const char *dir, char **filename
FILE *fp;
mode_t mask;
- file = g_build_filename (dir, TEMP_CACHE_FILENAME_PREFIX, NULL);
+ file = g_build_filename (DB_DIR, TEMP_CACHE_FILENAME_PREFIX, NULL);
fd = g_mkstemp (file);
if (fd < 0)
@@ -387,7 +388,7 @@ sync_database (const char *dir, GError **error)
fclose (tmp_file);
- cache_file = g_build_filename (dir, CACHE_FILENAME, NULL);
+ cache_file = g_build_filename (DB_DIR, CACHE_FILENAME, NULL);
if (rename (temp_cache_file, cache_file) < 0)
{
g_set_error (error, G_FILE_ERROR,