UnauthorizedAccessException in DirectoryAssert

Bug #631620 reported by Charlie Poole
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
NUnit V2
Fix Released
Medium
Charlie Poole

Bug Description

Running on Linux, the NUnit test method IsWithinPassesWithTempPath threw an UnauthorizedAccessException while trying to
access a restricted directory.

This is because DirectoryAssert.IsWithin checks against _all_ existing paths under the expected root and can happen in any instance where the path is not accessible.

DirectoryAssert is already deprecated and this indicates that it's obsolescence should be accelerated. A simple solution would be to use one of the PathConstraints in its implementation so that no access to actual directories is required.

Related branches

Changed in nunitv2:
status: New → In Progress
assignee: nobody → Charlie Poole (charlie.poole)
importance: Undecided → Medium
milestone: none → 2.5.8
Changed in nunitv2:
status: In Progress → Fix Committed
Changed in nunitv2:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.