summaryrefslogtreecommitdiff
path: root/update-mime-database.c
diff options
context:
space:
mode:
authorThomas Klausner <tk@giga.or.at>2013-10-17 04:35:00 +0000
committerBastien Nocera <hadess@hadess.net>2013-10-19 18:13:38 +0200
commit41f1d5ff2672c30d7f86759e2398b75c88673516 (patch)
tree2bf99c0c11afcd72d9b46143744a0091de74164b /update-mime-database.c
parent2397314542265405498ea8c82121c174ed9011a5 (diff)
downloadshared-mime-info-41f1d5ff2672c30d7f86759e2398b75c88673516.tar.gz
Open the fdatasync() fd read/write
Otherwise it will fail for stricter OSes like NetBSD. https://bugs.freedesktop.org/show_bug.cgi?id=70559
Diffstat (limited to 'update-mime-database.c')
-rw-r--r--update-mime-database.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/update-mime-database.c b/update-mime-database.c
index 86e73650..90c915be 100644
--- a/update-mime-database.c
+++ b/update-mime-database.c
@@ -951,7 +951,7 @@ static gboolean atomic_update(const gchar *pathname, GError **error)
new_name = g_strndup(pathname, len - 4);
#ifdef HAVE_FDATASYNC
- fd = open(pathname, O_RDONLY);
+ fd = open(pathname, O_RDWR);
if (fd == -1)
{
set_error_from_errno(error);