Skip to content

Commit

Permalink
fix(tar): create translated files in temp (#645)
Browse files Browse the repository at this point in the history
  • Loading branch information
piksel authored Jun 30, 2021
1 parent 8c0a169 commit ac96e60
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/ICSharpCode.SharpZipLib/Core/PathUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public static string DropPathRoot(string path)
/// </summary>
/// <param name="original">If specified, used as the base file name for the temporary file</param>
/// <returns>Returns a temporary file name</returns>
public static string GetTempFileName(string original)
public static string GetTempFileName(string original = null)
{
string fileName;
var tempPath = Path.GetTempPath();
Expand Down
2 changes: 1 addition & 1 deletion src/ICSharpCode.SharpZipLib/Tar/TarArchive.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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))
{
Expand Down

0 comments on commit ac96e60

Please sign in to comment.