File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
src/libraries/System.IO.FileSystem/tests/Directory Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -270,8 +270,10 @@ public void DirectoryLongerThanMaxLongPathWithExtendedSyntax_ThrowsException()
270270 {
271271 var paths = IOInputs . GetPathsLongerThanMaxLongPath ( GetTestFilePath ( ) , useExtendedSyntax : true ) ;
272272
273+ // Ideally this should be PathTooLongException or DirectoryNotFoundException but on some machines
274+ // windows gives us ERROR_INVALID_NAME, producing IOException.
273275 Assert . All ( paths , path =>
274- AssertExtensions . ThrowsAny < PathTooLongException , DirectoryNotFoundException > ( ( ) => Create ( path ) ) ) ;
276+ AssertExtensions . ThrowsAny < PathTooLongException , DirectoryNotFoundException , IOException > ( ( ) => Create ( path ) ) ) ;
275277 }
276278
277279 [ ConditionalFact ( nameof ( LongPathsAreNotBlocked ) , nameof ( UsingNewNormalization ) ) ]
You can’t perform that action at this time.
0 commit comments