Skip to content

Commit

Permalink
Fix Root path on unix Operating system
Browse files Browse the repository at this point in the history
  • Loading branch information
sensslen committed Feb 17, 2021
1 parent c814877 commit 14a6292
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/ICSharpCode.SharpZipLib/Tar/TarArchive.cs
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,11 @@ public string RootPath
}
// Convert to forward slashes for matching. Trim trailing / for correct final path
rootPath = value.Replace('\\', '/').TrimEnd('/');
// Fix rooted paths on linux
while (rootPath.StartsWith("/", StringComparison.Ordinal))
{
rootPath = rootPath.Substring(1);
}
}
}

Expand Down

0 comments on commit 14a6292

Please sign in to comment.