Skip to content

Commit 1c3f459

Browse files
iUnknwnpiksel
authored andcommitted
Merge PR #336: Treat empty string as no RootPath in TarArchive
Fixes #334
1 parent 43fd81e commit 1c3f459

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ICSharpCode.SharpZipLib/Tar/TarArchive.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -784,7 +784,7 @@ private void WriteEntryCore(TarEntry sourceEntry, bool recurse)
784784

785785
string newName = null;
786786

787-
if (rootPath != null)
787+
if (!String.IsNullOrEmpty(rootPath))
788788
{
789789
if (entry.Name.StartsWith(rootPath, StringComparison.OrdinalIgnoreCase))
790790
{

0 commit comments

Comments
 (0)