From 3ebfc74763d7a5048bbe0719472190efce4cda85 Mon Sep 17 00:00:00 2001 From: "Niall Douglas (s [underscore] sourceforge {at} nedprod [dot] com)" Date: Tue, 30 Jul 2024 14:20:18 +0100 Subject: [PATCH] More work on issue #137 --- .../v2.0/detail/impl/windows/directory_handle.ipp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/include/llfio/v2.0/detail/impl/windows/directory_handle.ipp b/include/llfio/v2.0/detail/impl/windows/directory_handle.ipp index f4439007..b13f5d53 100644 --- a/include/llfio/v2.0/detail/impl/windows/directory_handle.ipp +++ b/include/llfio/v2.0/detail/impl/windows/directory_handle.ipp @@ -334,22 +334,27 @@ result directory_handle::read(io_requestFileNameLength == 0 && buffer_->NextEntryOffset == 0)) + if((NTSTATUS) 0x80000006l /*STATUS_NO_MORE_FILES*/ == ntstat || (buffer_->FileNameLength == 0 && buffer_->NextEntryOffset == 0)) { break; } + if(ntstat < 0) + { + return ntkernel_error(ntstat); + } first = false; done = false; for(FILE_NAMES_INFORMATION *fni = buffer_; !done; @@ -396,14 +401,14 @@ result directory_handle::read(io_requestFileNameLength == 0 && buffer_->NextEntryOffset == 0)) { - // The directory grew between first enumeration and second LLFIO_DEADLINE_TO_TIMEOUT_LOOP(d); goto retry; }