From: Paul Eggert Date: Tue, 27 Dec 2005 07:55:03 +0000 (+0000) Subject: (diropen): Don't bother trying to open directory for write access: X-Git-Tag: v6.0~1026 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cc4d59e9cd0a54118dc0f0dc833539102a42ea4a;p=thirdparty%2Fcoreutils.git (diropen): Don't bother trying to open directory for write access: POSIX says that must fail. --- diff --git a/lib/fts.c b/lib/fts.c index eb24b9862c..d119541efe 100644 --- a/lib/fts.c +++ b/lib/fts.c @@ -203,10 +203,7 @@ static int internal_function diropen (char const *dir) { - int fd = open (dir, O_RDONLY | O_DIRECTORY); - if (fd < 0) - fd = open (dir, O_WRONLY | O_DIRECTORY); - return fd; + return open (dir, O_RDONLY | O_DIRECTORY | O_NOCTTY | O_NONBLOCK); } FTS *