Skip to content

Commit

Permalink
Removing oldFormat bool if not relevant to the method
Browse files Browse the repository at this point in the history
Some of the methods of the Utilities class using PgpLiteratalDataGenerator don't use the method for which useOldFormat is relevant. Removing oldFormat arg from method signature for those.
  • Loading branch information
magks authored Mar 30, 2023
1 parent 1d94e2a commit 7d4b573
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions PgpCore/Utilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -342,10 +342,9 @@ public static async Task WriteFileToLiteralDataAsync(
Stream output,
char fileType,
FileInfo file,
byte[] buffer,
bool useOldFormat = false)
byte[] buffer)
{
PgpLiteralDataGenerator lData = new PgpLiteralDataGenerator(useOldFormat);
PgpLiteralDataGenerator lData = new PgpLiteralDataGenerator();
Stream pOut = lData.Open(output, fileType, file.Name, file.LastWriteTime, buffer);
await PipeFileContentsAsync(file, pOut, buffer.Length);
lData.Close();
Expand All @@ -356,10 +355,9 @@ public static void WriteFileToLiteralData(
Stream output,
char fileType,
FileInfo file,
byte[] buffer,
bool useOldFormat = false)
byte[] buffer)
{
PgpLiteralDataGenerator lData = new PgpLiteralDataGenerator(useOldFormat);
PgpLiteralDataGenerator lData = new PgpLiteralDataGenerator();
Stream pOut = lData.Open(output, fileType, file.Name, file.LastWriteTime, buffer);
PipeFileContents(file, pOut, buffer.Length);
lData.Close();
Expand Down Expand Up @@ -396,10 +394,9 @@ public static async Task WriteStreamToLiteralDataAsync(
char fileType,
Stream input,
byte[] buffer,
string name,
bool useOldFormat = false)
string name)
{
PgpLiteralDataGenerator lData = new PgpLiteralDataGenerator(useOldFormat);
PgpLiteralDataGenerator lData = new PgpLiteralDataGenerator();
Stream pOut = lData.Open(output, fileType, name, DateTime.Now, buffer);
await PipeStreamContentsAsync(input, pOut, buffer.Length);
lData.Close();
Expand All @@ -410,10 +407,9 @@ public static void WriteStreamToLiteralData(
char fileType,
Stream input,
byte[] buffer,
string name,
bool useOldFormat = false)
string name)
{
PgpLiteralDataGenerator lData = new PgpLiteralDataGenerator(useOldFormat);
PgpLiteralDataGenerator lData = new PgpLiteralDataGenerator();
Stream pOut = lData.Open(output, fileType, name, DateTime.Now, buffer);
PipeStreamContents(input, pOut, buffer.Length);
lData.Close();
Expand Down

0 comments on commit 7d4b573

Please sign in to comment.