Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2005-10-13 00:38:38 +0400
committerChristopher Faylor <me@cgf.cx>2005-10-13 00:38:38 +0400
commitbf1550b6f8387fe892c6e6e1c86316634a0604ae (patch)
tree7d9311a5cda548bc12d789eec3b78f77b43714c3 /winsup/cygwin/dir.cc
parent48882f9a07b5fcc2a892387d9af079a774482f1e (diff)
* dir.cc (mkdir): Abandon use of PC_WRITABLE.
(rmdir): Ditto. * path.h (PC_WRITABLE): Delete. * path.cc (path_conv::check): Remove PC_WRITABLE accommodations. Revisit later.
Diffstat (limited to 'winsup/cygwin/dir.cc')
-rw-r--r--winsup/cygwin/dir.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/winsup/cygwin/dir.cc b/winsup/cygwin/dir.cc
index c6b318edd..0d25619b9 100644
--- a/winsup/cygwin/dir.cc
+++ b/winsup/cygwin/dir.cc
@@ -265,7 +265,7 @@ mkdir (const char *dir, mode_t mode)
return -1;
}
- if (!(fh = build_fh_name (dir, NULL, PC_SYM_NOFOLLOW | PC_WRITABLE)))
+ if (!(fh = build_fh_name (dir, NULL, PC_SYM_NOFOLLOW)))
goto done; /* errno already set */;
if (fh->error ())
@@ -299,13 +299,16 @@ rmdir (const char *dir)
return -1;
}
- if (!(fh = build_fh_name (dir, NULL, PC_SYM_NOFOLLOW | PC_WRITABLE)))
+ if (!(fh = build_fh_name (dir, NULL, PC_SYM_NOFOLLOW)))
goto done; /* errno already set */;
if (fh->error ())
{
debug_printf ("got %d error from build_fh_name", fh->error ());
- set_errno (fh->error ());
+ if (fh->error ())
+ set_errno (EROFS);
+ else
+ set_errno (fh->error ());
}
else if (!fh->rmdir ())
res = 0;