mirror of
https://github.com/boostorg/filesystem.git
synced 2026-01-19 16:22:11 +00:00
Reworked remove() operation to separate POSIX and Windows implementations. On Windows, if the file to be removed is read-only, try to reset the read-only attribute before deleting the file. If deleting fails (other than because the file is already deleted), try to restore the read-only attribute. As a side effect, we were able to remove an implementation detail value from the file_type enum that was used by the old remove() implementation. Added a test for remove() on a read-only file on Windows. Also added tests for remove_all(), including for cases with symlinks, hardlinks and read-only files. Also, corrected mklink /J argument in tests. The command accepts /j (lowercase) to the same effect, but the formal help lists /J (uppercase) to create junctions. Reported in https://github.com/boostorg/filesystem/issues/216.
4.0 KiB
4.0 KiB