Skip to content
This repository has been archived by the owner on Apr 9, 2024. It is now read-only.

Commit

Permalink
Merge pull request #159 from in1gma/dev
Browse files Browse the repository at this point in the history
Fixed archive file name when volume number is over 1000
  • Loading branch information
squid-box committed Mar 22, 2023
2 parents 7ce04c5 + a7d47c7 commit 0a76267
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions SevenZip/StreamWrappers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -274,19 +274,20 @@ public virtual void Dispose()

protected static string VolumeNumber(int num)
{
string prefix;
if (num < 10)
{
return ".00" + num.ToString(CultureInfo.InvariantCulture);
prefix = ".00";
}
if (num > 9 && num < 100)
else if (num < 100)
{
return ".0" + num.ToString(CultureInfo.InvariantCulture);
prefix = ".0";
}
if (num > 99 && num < 1000)
else
{
return "." + num.ToString(CultureInfo.InvariantCulture);
prefix = ".";
}
return String.Empty;
return prefix + num.ToString(CultureInfo.InvariantCulture);
}

private int StreamNumberByOffset(long offset)
Expand Down

0 comments on commit 0a76267

Please sign in to comment.