You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
System.IO: Allow recursive file system enumeration to continue when directory link's target does not exist #58612
Perhaps this should be considered holistically as part of .Net 7's improved and more integrated support of file system links into various APIs, but at the least it would be nice to add:
publicclassEnumerationOptions{publicboolIgnoreUnresolvableLinkTargets{get;set;}// when false preserves current (DotNet 6) behavior, i.e. throws DirectoryNotFoundException when target cannot be found}
to prevent throwing of DirectoryNotFoundException when a symlink / junction is encountered during enumeration which has invalid (non-existing) target, as often it is valuable to continue enumeration regardless, plus it will parallel existing IgnoreInaccessible option.
Activity
iSazonov commentedon Sep 4, 2021
I'd qualify this as a bug and re-use
EnumerationOptions.IgnoreInaccessibleto mask the exception./cc @carlossanlop @jozkee