Skip to content

Commit 6d5870d

Browse files
authored
Fix the path check to ensure it correctly handles casing and character codes (#45883)
2 parents 030cf92 + 4dad91c commit 6d5870d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Tasks/sdk-tasks/ExtractArchiveToDirectory.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ private string GetFullDirectoryPathWithSeperator(string directory)
186186
{
187187
string fullDirectoryPath = Path.GetFullPath(directory);
188188

189-
if (!fullDirectoryPath.EndsWith(Path.DirectorySeparatorChar.ToString()))
189+
if (!fullDirectoryPath.EndsWith(Path.DirectorySeparatorChar.ToString(), StringComparison.OrdinalIgnoreCase))
190190
{
191191
fullDirectoryPath = string.Concat(fullDirectoryPath, Path.DirectorySeparatorChar);
192192
}

0 commit comments

Comments
 (0)