diff --git a/AlphaFS/Filesystem/FindFileSystemEntryInfo.cs b/AlphaFS/Filesystem/FindFileSystemEntryInfo.cs index a739b3b5a..527a09a27 100644 --- a/AlphaFS/Filesystem/FindFileSystemEntryInfo.cs +++ b/AlphaFS/Filesystem/FindFileSystemEntryInfo.cs @@ -297,10 +297,9 @@ private SafeFindFileHandle FindFirstFile(string pathLp, out NativeMethods.WIN32_ ThrowPossibleException((uint) lastError, pathLp); } - // When the handle is null and we are still here, it means the ErrorHandler is active, - // preventing the Exception from being thrown. + // When the handle is null and we are still here, it means the ErrorHandler is active, preventing the Exception from being thrown. - if (null != handle) + if (null != handle && lastError != Win32Errors.NO_ERROR) VerifyInstanceType(win32FindData); }