Updated assert statement to include a check for Timeout in FileSystem… (#35298)
authorvivekbm <7387586+vivekbm@users.noreply.github.com>
Thu, 23 Apr 2020 13:50:34 +0000 (19:20 +0530)
committerGitHub <noreply@github.com>
Thu, 23 Apr 2020 13:50:34 +0000 (09:50 -0400)
* Updated assert statement to include a check for Timeout in FileSystem.Attributes.Windows

* fixes 28831
Added the check, the earlier commit had a syntax error.

src/libraries/Common/src/System/IO/FileSystem.Attributes.Windows.cs

index 977293e..274f049 100644 (file)
@@ -81,7 +81,7 @@ namespace System.IO
                         )
                     {
                         // Assert so we can track down other cases (if any) to add to our test suite
-                        Debug.Assert(errorCode == Interop.Errors.ERROR_ACCESS_DENIED || errorCode == Interop.Errors.ERROR_SHARING_VIOLATION,
+                        Debug.Assert(errorCode == Interop.Errors.ERROR_ACCESS_DENIED || errorCode == Interop.Errors.ERROR_SHARING_VIOLATION || errorCode == Interop.Errors.ERROR_SEM_TIMEOUT,
                             $"Unexpected error code getting attributes {errorCode} from path {path}");
 
                         // Files that are marked for deletion will not let you GetFileAttributes,