diff --git a/src/CommonUtilities.FileSystem/src/Commonutilities.FileSystem.csproj b/src/CommonUtilities.FileSystem/src/Commonutilities.FileSystem.csproj index 1444af2..bd61a57 100644 --- a/src/CommonUtilities.FileSystem/src/Commonutilities.FileSystem.csproj +++ b/src/CommonUtilities.FileSystem/src/Commonutilities.FileSystem.csproj @@ -22,6 +22,10 @@ + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + diff --git a/src/CommonUtilities.FileSystem/src/Extensions/PathExtensions.cs b/src/CommonUtilities.FileSystem/src/Extensions/PathExtensions.cs index 0626dd6..57402e5 100644 --- a/src/CommonUtilities.FileSystem/src/Extensions/PathExtensions.cs +++ b/src/CommonUtilities.FileSystem/src/Extensions/PathExtensions.cs @@ -1,4 +1,5 @@ using System; +using System.Diagnostics.CodeAnalysis; using System.IO; using System.IO.Abstractions; using System.Linq; @@ -80,7 +81,7 @@ private static bool IsAnyDirectorySeparator(char c) /// If is drive relative the drive's letter will be stored into this variable. /// if is not drive relative. /// Return if is relative, but not absolute to a drive; otherwise, . - public static bool IsDriveRelative(this IPath fsPath, string? path, out char? driveLetter) + public static bool IsDriveRelative(this IPath fsPath, string? path, [NotNullWhen(true)] out char? driveLetter) { driveLetter = null; @@ -103,9 +104,9 @@ public static bool IsDriveRelative(this IPath fsPath, string? path, out char? dr driveLetter = path[0]; return true; } + return false; } - return false; }