summaryrefslogtreecommitdiff
path: root/gio/glocalfileinfo.c
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2012-08-27 18:30:06 -0400
committerColin Walters <walters@verbum.org>2012-08-28 13:56:59 -0400
commit6e64ba58b90d1d834a6b5f61acec6755e4b80072 (patch)
tree7bd087c97afbc7816aee82abdea54547885e0533 /gio/glocalfileinfo.c
parent2542b6f60492fadfb21f2c4a29976c3494c7e6c5 (diff)
downloadglib-6e64ba58b90d1d834a6b5f61acec6755e4b80072.tar.gz
Switch all open() calls to use g_open()
Because it now handles EINTR. And we should do so. While most people use Linux, which tries very hard to avoid propagating EINTR back up into userspace, it can still happen. https://bugzilla.gnome.org/show_bug.cgi?id=682833
Diffstat (limited to 'gio/glocalfileinfo.c')
-rw-r--r--gio/glocalfileinfo.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gio/glocalfileinfo.c b/gio/glocalfileinfo.c
index 407067a94..af4fc43aa 100644
--- a/gio/glocalfileinfo.c
+++ b/gio/glocalfileinfo.c
@@ -1247,10 +1247,10 @@ get_content_type (const char *basename,
sniff_length = 4096;
#ifdef O_NOATIME
- fd = open (path, O_RDONLY | O_NOATIME);
+ fd = g_open (path, O_RDONLY | O_NOATIME, 0);
if (fd < 0 && errno == EPERM)
#endif
- fd = open (path, O_RDONLY);
+ fd = g_open (path, O_RDONLY, 0);
if (fd != -1)
{