diff options
author | Niall Douglas <s_github@nedprod.com> | 2022-08-04 23:18:04 +0300 |
---|---|---|
committer | Niall Douglas <s_github@nedprod.com> | 2022-08-04 23:18:04 +0300 |
commit | cea5ea3719fbf08a8b146f98447b1636e34259ae (patch) | |
tree | cd344a7a5c3582c0d9a90e425c63bd7765f60845 | |
parent | c3b82134c8462ba963fc1bacbde4b5e27ebf9af4 (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.ipp | 6 |
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); |