4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-02-08 18:19:08 +08:00
Corinna Vinschen b1199ab7b0 Cygwin: unlink/rename: fix skipping deletion with POSIX semantics
unlink_nt() and rename2 () both check for the FILE_SUPPORTS_OPEN_BY_FILE_ID
flag to use POSIX delete/rename semantics.  Both erroneously check the flag
against the file attributes using has_attributes().

Given that this flag is a filesystem flag, check using fs_flags() instead.

Fixes: fe2545e9faaf ("Cygwin: don't use unlink/rename POSIX semantics on certain NTFS")
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
(cherry picked from commit 264544bf72f6ed85530a1b058e9efdb73ab72e90)
2025-01-12 23:12:19 +01:00
..
2024-09-12 10:57:24 -04:00

THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESSED OR
IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.

Cygwin documentation is available on the net at https://cygwin.com
You might especially be interested in

https://cygwin.com/faq/faq.html#faq.programming.building-cygwin