* dir.cc (writable_directory): Remove.

(mkdir): Remove call to writable_directory.
	* syscalls.cc (unlink): Ditto.
	(rename): Ditto.
	* winsup.h (writable_directory): Remove declaration.
This commit is contained in:
Corinna Vinschen
2004-05-03 11:53:07 +00:00
parent 2d465f741f
commit 1e98729b2a
4 changed files with 8 additions and 51 deletions

View File

@@ -162,14 +162,6 @@ unlink (const char *ourname)
goto done;
}
/* Windows won't check the directory mode, so we do that ourselves. */
if (!writable_directory (win32_name))
{
syscall_printf ("non-writable directory");
set_errno (EPERM);
goto done;
}
bool setattrs;
if (!((DWORD) win32_name & (FILE_ATTRIBUTE_READONLY | FILE_ATTRIBUTE_SYSTEM)))
setattrs = false;
@@ -1212,13 +1204,6 @@ rename (const char *oldpath, const char *newpath)
return -1;
}
if (!writable_directory (real_old) || !writable_directory (real_new))
{
syscall_printf ("-1 = rename (%s, %s)", oldpath, newpath);
set_errno (EACCES);
return -1;
}
if (!real_old.exists ()) /* file to move doesn't exist */
{
syscall_printf ("file to move doesn't exist");