diff --git a/src/ICSharpCode.SharpZipLib/Core/PathUtils.cs b/src/ICSharpCode.SharpZipLib/Core/PathUtils.cs index 77c4b07fc..b8d0dd409 100644 --- a/src/ICSharpCode.SharpZipLib/Core/PathUtils.cs +++ b/src/ICSharpCode.SharpZipLib/Core/PathUtils.cs @@ -36,7 +36,7 @@ public static string DropPathRoot(string path) /// /// If specified, used as the base file name for the temporary file /// Returns a temporary file name - public static string GetTempFileName(string original) + public static string GetTempFileName(string original = null) { string fileName; var tempPath = Path.GetTempPath(); diff --git a/src/ICSharpCode.SharpZipLib/Tar/TarArchive.cs b/src/ICSharpCode.SharpZipLib/Tar/TarArchive.cs index 3ae5f7757..4b373fb64 100644 --- a/src/ICSharpCode.SharpZipLib/Tar/TarArchive.cs +++ b/src/ICSharpCode.SharpZipLib/Tar/TarArchive.cs @@ -824,7 +824,7 @@ private void WriteEntryCore(TarEntry sourceEntry, bool recurse) { if (!IsBinary(entryFilename)) { - tempFileName = Path.GetRandomFileName(); + tempFileName = PathUtils.GetTempFileName(); using (StreamReader inStream = File.OpenText(entryFilename)) {