X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fopen.c;h=8027b473a5a385816248b638a486abce5071aaf5;hb=14b6206605af50774bc0202b7cbcce9418f8ede5;hp=7cc25bd07c9511f94b87fce85c442d35e5fb92b0;hpb=ec65f38e49b3db77ef9866f888f0a8d743cfe742;p=gnulib.git diff --git a/lib/open.c b/lib/open.c index 7cc25bd07..8027b473a 100644 --- a/lib/open.c +++ b/lib/open.c @@ -111,7 +111,7 @@ open (const char *filename, int flags, ...) override fstat() in fchdir.c to hide the fact that we have a dummy. */ if (REPLACE_OPEN_DIRECTORY && fd < 0 && errno == EACCES - && (mode & O_ACCMODE) == O_RDONLY) + && (flags & O_ACCMODE) == O_RDONLY) { struct stat statbuf; if (stat (filename, &statbuf) == 0 && S_ISDIR (statbuf.st_mode))