diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2004-05-03 11:53:07 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2004-05-03 11:53:07 +0000 |
commit | 1e98729b2a230b271b4a5f56f80ca56e32d790a7 (patch) | |
tree | eccb91137779b9c8740cb5d8a775569994a20f80 /winsup/cygwin/dir.cc | |
parent | 2d465f741f72993c611ce63f6ee83379eca7f4df (diff) | |
download | cygnal-1e98729b2a230b271b4a5f56f80ca56e32d790a7.tar.gz cygnal-1e98729b2a230b271b4a5f56f80ca56e32d790a7.tar.bz2 cygnal-1e98729b2a230b271b4a5f56f80ca56e32d790a7.zip |
* dir.cc (writable_directory): Remove.
(mkdir): Remove call to writable_directory.
* syscalls.cc (unlink): Ditto.
(rename): Ditto.
* winsup.h (writable_directory): Remove declaration.
Diffstat (limited to 'winsup/cygwin/dir.cc')
-rw-r--r-- | winsup/cygwin/dir.cc | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/winsup/cygwin/dir.cc b/winsup/cygwin/dir.cc index 1bb7f0013..d0a650434 100644 --- a/winsup/cygwin/dir.cc +++ b/winsup/cygwin/dir.cc @@ -24,39 +24,6 @@ details. */ #include "dtable.h" #include "cygheap.h" -/* Cygwin internal */ -/* Return whether the directory of a file is writable. Return 1 if it - is. Otherwise, return 0, and set errno appropriately. */ -int __stdcall -writable_directory (const char *file) -{ -#if 0 - char dir[strlen (file) + 1]; - - strcpy (dir, file); - - const char *usedir; - char *slash = strrchr (dir, '\\'); - if (slash == NULL) - usedir = "."; - else if (slash == dir) - { - usedir = "\\"; - } - else - { - *slash = '\0'; - usedir = dir; - } - - int acc = access (usedir, W_OK); - - return acc == 0; -#else - return 1; -#endif -} - extern "C" int dirfd (DIR *dir) { @@ -274,8 +241,6 @@ mkdir (const char *dir, mode_t mode) } nofinalslash (real_dir.get_win32 (), real_dir.get_win32 ()); - if (! writable_directory (real_dir.get_win32 ())) - goto done; if (allow_ntsec && real_dir.has_acls ()) set_security_attribute (S_IFDIR | ((mode & 07777) & ~cygheap->umask), |