From 87bc41714fe3fcb66083fe0fe40602f2bf77cb0b Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Thu, 29 May 2008 23:05:35 +0000 Subject: [PATCH] Mask out X_OK to avoid problem on Vista. X_OK was just ignored by access() 2008-05-30 Tor Lillqvist * glib/gstdio.c (g_access) [Win32]: Mask out X_OK to avoid problem on Vista. X_OK was just ignored by access() in earlier Microsoft C libraries. (Which is fine as executability has little meaning on Windows.) The one on Vista returns an error if X_OK is passed. svn path=/trunk/; revision=6961 --- ChangeLog | 7 +++++++ glib/gstdio.c | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index f6c9cee..f99fdbc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-05-30 Tor Lillqvist + + * glib/gstdio.c (g_access) [Win32]: Mask out X_OK to avoid problem + on Vista. X_OK was just ignored by access() in earlier Microsoft C + libraries. (Which is fine as executability has little meaning on + Windows.) The one on Vista returns an error if X_OK is passed. + 2008-05-29 Tor Lillqvist * glib/gstdio.h diff --git a/glib/gstdio.c b/glib/gstdio.c index 09167a7..285bfe9 100644 --- a/glib/gstdio.c +++ b/glib/gstdio.c @@ -85,7 +85,7 @@ g_access (const gchar *filename, return -1; } - retval = _waccess (wfilename, mode); + retval = _waccess (wfilename, mode & ~X_OK); save_errno = errno; g_free (wfilename); -- 2.7.4