Skip to content

Commit 93e3464

Browse files
sensslenSimon Ensslen
authored and
Simon Ensslen
committed
Fix Root path on unix Operating system
(cherry picked from commit 14a6292)
1 parent 3e865dd commit 93e3464

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/ICSharpCode.SharpZipLib/Tar/TarArchive.cs

+5
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,11 @@ public string RootPath
358358
}
359359
// Convert to forward slashes for matching. Trim trailing / for correct final path
360360
rootPath = value.Replace('\\', '/').TrimEnd('/');
361+
// Fix rooted paths on linux
362+
while (rootPath.StartsWith("/", StringComparison.Ordinal))
363+
{
364+
rootPath = rootPath.Substring(1);
365+
}
361366
}
362367
}
363368

0 commit comments

Comments
 (0)