On 18-01-2021 13:13, Corinna Vinschen via Cygwin-patches wrote: > > Your code is skipping the safety checks and the has_dot_last_component() > check. The latter implements a check required by POSIX. Skipping > it introduces an incompatibility, see man 2 rmdir. > Yes, I missed has_dot_last_component completely. As for the other checks: dir.cc: 404: fh->error (): * Done in unlink_nt dir.cc: 409: fh->exists (): * Done in _unlink_nt through NtOpenFile, which will return either STATUS_OBJECT_NAME_NOT_FOUND or STATUS_OBJECT_PATH_NOT_FOUND, both of which resolve to ENOENT dir.cc: 413: isdev_dev (fh->dev ()): * Done in unlink_nt fhandler_siak_file.cc: 1842: if (!pc.isdir ()) * Done in _unlink_nt through NtOpenFile with flags FILE_DIRECTORY_FILE and FILE_NON_DIRECTORY_FILE which will return STATUS_NOT_A_DIRECTORY and STATUS_FILE_IS_A_DIRECTORY respectively. Have I missed something else? Also, I think it's better to have isdev_dev (fh->dev ()) return EROFS, which is the same as unlink.
- [PATCH 08/11] path.cc: Allow to skip f... Ben Wijen
- Re: [PATCH 08/11] path.cc: Allow ... Corinna Vinschen via Cygwin-patches
- Re: [PATCH 08/11] path.cc: Al... Ben
- Re: [PATCH 08/11] path.cc... Corinna Vinschen via Cygwin-patches
- [PATCH 09/11] mount.cc: Implement poor... Ben Wijen
- Re: [PATCH 09/11] mount.cc: Imple... Corinna Vinschen via Cygwin-patches
- [PATCH 10/11] syscalls.cc: Expose shal... Ben Wijen
- [PATCH 11/11] dir.cc: Try unlink_nt fi... Ben Wijen
- Re: [PATCH 11/11] dir.cc: Try unl... Corinna Vinschen via Cygwin-patches
- Re: [PATCH 11/11] dir.cc: Try... Ben
- Re: [PATCH 11/11] dir.cc:... Ben
- Re: [PATCH 11/11] dir.cc:... Corinna Vinschen via Cygwin-patches
- [PATCH v2 0/8] Improve rm speed Ben Wijen
- [PATCH v2 1/8] syscalls.cc: unlink_nt:... Ben Wijen
- Re: [PATCH v2 1/8] syscalls.cc: u... Corinna Vinschen via Cygwin-patches
- [PATCH v3 1/8] syscalls.cc: u... Ben Wijen
- Re: [PATCH v3 1/8] syscal... Corinna Vinschen via Cygwin-patches
- [PATCH v2 2/8] syscalls.cc: Deduplicat... Ben Wijen
- Re: [PATCH v2 2/8] syscalls.cc: D... Corinna Vinschen via Cygwin-patches
- [PATCH v3 2/8] syscalls.cc: D... Ben Wijen