Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ned14/llfio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiall Douglas <s_github@nedprod.com>2022-08-04 23:18:04 +0300
committerNiall Douglas <s_github@nedprod.com>2022-08-04 23:18:04 +0300
commitcea5ea3719fbf08a8b146f98447b1636e34259ae (patch)
treecd344a7a5c3582c0d9a90e425c63bd7765f60845
parentc3b82134c8462ba963fc1bacbde4b5e27ebf9af4 (diff)
stat on Windows was failing if the file is on SMB and "too much" metadata was requested.
-rw-r--r--include/llfio/v2.0/detail/impl/windows/stat.ipp6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/llfio/v2.0/detail/impl/windows/stat.ipp b/include/llfio/v2.0/detail/impl/windows/stat.ipp
index 148912bc..62d867a3 100644
--- a/include/llfio/v2.0/detail/impl/windows/stat.ipp
+++ b/include/llfio/v2.0/detail/impl/windows/stat.ipp
@@ -101,11 +101,17 @@ LLFIO_HEADERS_ONLY_MEMFUNC_SPEC result<size_t> stat_t::fill(const handle &h, sta
}
if(ntstat < 0)
{
+ if(ntstat == 0xC000000D /*STATUS_INVALID_PARAMETER*/)
+ {
+ // FileAllInformation fails on SMB mounts :(
+ goto fallback;
+ }
return ntkernel_error(ntstat);
}
}
else
{
+ fallback:
if(needInternal)
{
ntstat = NtQueryInformationFile(h.native_handle().h, &isb, &fai.InternalInformation, sizeof(fai.InternalInformation), FileInternalInformation);