Fix read file on system attribute

This commit is contained in:
digant73
2026-09-15 01:08:48 +03:00
committed by Elad
parent 4f11259e58
commit b14b6d3cef
+1 -1
View File
@@ -2024,7 +2024,7 @@ fs::file::file(const std::string& path, bs_t<open_mode> mode)
return;
}
if (info.dwFileAttributes & FILE_ATTRIBUTE_SYSTEM)
if ((mode & fs::write) && (info.dwFileAttributes & FILE_ATTRIBUTE_SYSTEM))
{
CloseHandle(handle);
g_tls_error = fs::error::acces;