Skip to content

Commit

Permalink
Remove comment in ZipFile.Create.cs
Browse files Browse the repository at this point in the history
In dotnet#85491 the stream-based version of the `DoCreateFromDirectory` override copy-pasted comments from the string-based version
```csharp
// Rely on Path.GetFullPath for validation of sourceDirectoryName and destinationArchive
```
The last clause of that comment is not relevant in the stream-based version (the argument is `Stream destination`) so deleted that clause.

It's possible that the other comment is also misleading as we test the `compressionLevel ` argument just above (unlike in the `String destinationArchive` version
```csharp
            // Checking of compressionLevel is passed down to DeflateStream and the IDeflater implementation
            // as it is a pluggable component that completely encapsulates the meaning of compressionLevel.
```
  • Loading branch information
IDisposable authored May 30, 2023
1 parent 4d709cd commit 94f033e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ private static void DoCreateFromDirectory(string sourceDirectoryName, Stream des
throw new ArgumentOutOfRangeException(nameof(compressionLevel));
}

// Rely on Path.GetFullPath for validation of sourceDirectoryName and destinationArchive
// Rely on Path.GetFullPath for validation of sourceDirectoryName

// Checking of compressionLevel is passed down to DeflateStream and the IDeflater implementation
// as it is a pluggable component that completely encapsulates the meaning of compressionLevel.
Expand Down

0 comments on commit 94f033e

Please sign in to comment.