upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/test/file_system_test.cpp
diff options
context:
space:
mode:
authorGeremy Cambus <43472014+GeremC@users.noreply.github.com>2026-11-23 16:52:38 +0100
committerGitHub <noreply@github.com>2026-11-23 09:52:38 -0600
commit87c6c2b261fedfac36d5b32e375bbe76b03bdd06 (patch)
tree6a67df66514c31e69bc58d41ba3b7eb7147717a2 /runtime/test/file_system_test.cpp
parent3e5596bf4b857fdc192a2708278c98d915fb9c8d (diff)
file_system_test: a refused delete keeps the host's attributes, not the ones set (#6861)
Squash-merged after diff review of PR #6861 - file_system_test: a refused delete keeps the host's attributes, not the ones set
Diffstat (limited to 'runtime/test/file_system_test.cpp')
-rw-r--r--runtime/test/file_system_test.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/runtime/test/file_system_test.cpp b/runtime/test/file_system_test.cpp
index 3ba1482f7..0cd1771f4 100644
--- a/runtime/test/file_system_test.cpp
+++ b/runtime/test/file_system_test.cpp
@@ -580,7 +580,12 @@ void run_checks(const std::filesystem::path& root) {
580 check(std::filesystem::exists(overlay_file) == (has_overlay && readonly), 580 check(std::filesystem::exists(overlay_file) == (has_overlay && readonly),
581 "a refused delete keeps its overlay and never copies the package up"); 581 "a refused delete keeps its overlay and never copies the package up");
582 if (readonly) { 582 if (readonly) {
583 check(attributes_w(logical.c_str()) == visible_attributes, 583 // The host's answer for a real file given the same attributes, which survived its refused
584 // delete: Windows reads back exactly what was set, while Wine 9 adds ARCHIVE and keeps neither
585 // HIDDEN nor SYSTEM without its xattr support (0x21 for every read-only case here).
586 const DWORD native_attributes = ::GetFileAttributesW(native_file.c_str());
587 check(native_attributes != INVALID_FILE_ATTRIBUTES &&
588 attributes_w(logical.c_str()) == native_attributes,
584 "a refused delete retains the visible attributes"); 589 "a refused delete retains the visible attributes");
585 const HANDLE retained = create_w(logical.c_str(), GENERIC_READ, FILE_SHARE_READ, nullptr, 590 const HANDLE retained = create_w(logical.c_str(), GENERIC_READ, FILE_SHARE_READ, nullptr,
586 OPEN_EXISTING, 0, nullptr); 591 OPEN_EXISTING, 0, nullptr);