From 1e3b552861e731922649049ee1d8ea0668066f2f Mon Sep 17 00:00:00 2001 From: Sergey Filippov Date: Wed, 23 Mar 2022 12:02:13 +0100 Subject: [PATCH] #727: Normalize readme entry path prior to extraction --- src/BaGet.Core/Extensions/PackageArchiveReaderExtensions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/BaGet.Core/Extensions/PackageArchiveReaderExtensions.cs b/src/BaGet.Core/Extensions/PackageArchiveReaderExtensions.cs index 3e01432b..d2219eb5 100644 --- a/src/BaGet.Core/Extensions/PackageArchiveReaderExtensions.cs +++ b/src/BaGet.Core/Extensions/PackageArchiveReaderExtensions.cs @@ -29,7 +29,7 @@ public async static Task GetReadmeAsync( throw new InvalidOperationException("Package does not have a readme!"); } - return await package.GetStreamAsync(readmePath, cancellationToken); + return await package.GetStreamAsync(PathUtility.StripLeadingDirectorySeparators(readmePath), cancellationToken); } public async static Task GetIconAsync(