From 97fe820f88496c222533718348fbf5e4456d20e7 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 27 Dec 2005 07:57:14 +0000 Subject: (save_cwd): Don't bother trying to open directory for write access: POSIX says that must fail. --- lib/save-cwd.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/save-cwd.c b/lib/save-cwd.c index 4ff600e58..f842ccafc 100644 --- a/lib/save-cwd.c +++ b/lib/save-cwd.c @@ -75,12 +75,8 @@ save_cwd (struct saved_cwd *cwd) cwd->desc = open (".", O_RDONLY); if (cwd->desc < 0) { - cwd->desc = open (".", O_WRONLY); - if (cwd->desc < 0) - { - cwd->name = xgetcwd (); - return cwd->name ? 0 : -1; - } + cwd->name = xgetcwd (); + return cwd->name ? 0 : -1; } return 0; -- cgit v1.2.3-70-g09d2