diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2007-02-22 16:04:19 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2007-02-22 16:04:19 +0000 |
commit | 501f1020f94e73eedaf581c1371387e2ae0edb8b (patch) | |
tree | 1f8d56834d2935b6eb8d821440c3b7fdfa883647 /winsup/cygwin/syscalls.cc | |
parent | e387a378b452c5524665b149af41779c416134fa (diff) | |
download | cygnal-501f1020f94e73eedaf581c1371387e2ae0edb8b.tar.gz cygnal-501f1020f94e73eedaf581c1371387e2ae0edb8b.tar.bz2 cygnal-501f1020f94e73eedaf581c1371387e2ae0edb8b.zip |
Throughout remove all usage of wincap.access_denied_on_delete.
* dir.cc (rmdir): Add existance check to be errno-compatible with Linux.
* fhandler_disk_file.cc (fhandler_disk_file::rmdir): Drop test for
non-existent dir on 9x share.
* syscalls.cc (unlink): Add comment.
* wincap.cc: Remove access_denied_on_delete flag throughout.
* wincap.h: Ditto.
Diffstat (limited to 'winsup/cygwin/syscalls.cc')
-rw-r--r-- | winsup/cygwin/syscalls.cc | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc index 5e2bb5b66..ed11037d9 100644 --- a/winsup/cygwin/syscalls.cc +++ b/winsup/cygwin/syscalls.cc @@ -392,11 +392,8 @@ unlink (const char *ourname) { SetFileAttributes (win32_name, (DWORD) win32_name); - /* Windows 9x seems to report ERROR_ACCESS_DENIED rather than sharing - violation. */ - if ((wincap.access_denied_on_delete () && lasterr == ERROR_ACCESS_DENIED - && !win32_name.isremote ()) - || lasterr == ERROR_SHARING_VIOLATION) + /* FIXME: Can we get rid of the delqueue now? */ + if (lasterr == ERROR_SHARING_VIOLATION) { /* Add file to the "to be deleted" queue. */ syscall_printf ("Sharing violation, couldn't delete file"); @@ -1443,14 +1440,7 @@ rename (const char *oldpath, const char *newpath) /* Since neither MoveFileEx(MOVEFILE_REPLACE_EXISTING) nor DeleteFile allow to remove directories, this case is handled separately. */ if (!RemoveDirectoryA (real_new)) - { - syscall_printf ("Can't remove target directory"); - /* On 9X ERROR_ACCESS_DENIED is returned if you try to remove - a non-empty directory. */ - if (GetLastError () == ERROR_ACCESS_DENIED - && wincap.access_denied_on_delete ()) - SetLastError (ERROR_DIR_NOT_EMPTY); - } + syscall_printf ("Can't remove target directory"); else if (MoveFile (real_old, real_new)) res = 0; } |