Skip to content

Commit aca0eab

Browse files
Remove comment in ZipFile.Create.cs (#86927)
* Remove comment in ZipFile.Create.cs In #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. ``` * Remove compressionLevel validation comment Co-authored-by: Carlos Sánchez López <[email protected]> --------- Co-authored-by: Carlos Sánchez López <[email protected]>
1 parent 9628be4 commit aca0eab

File tree

1 file changed

+1
-4
lines changed
  • src/libraries/System.IO.Compression.ZipFile/src/System/IO/Compression

1 file changed

+1
-4
lines changed

src/libraries/System.IO.Compression.ZipFile/src/System/IO/Compression/ZipFile.Create.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -459,10 +459,7 @@ private static void DoCreateFromDirectory(string sourceDirectoryName, Stream des
459459
throw new ArgumentOutOfRangeException(nameof(compressionLevel));
460460
}
461461

462-
// Rely on Path.GetFullPath for validation of sourceDirectoryName and destinationArchive
463-
464-
// Checking of compressionLevel is passed down to DeflateStream and the IDeflater implementation
465-
// as it is a pluggable component that completely encapsulates the meaning of compressionLevel.
462+
// Rely on Path.GetFullPath for validation of sourceDirectoryName
466463

467464
sourceDirectoryName = Path.GetFullPath(sourceDirectoryName);
468465

0 commit comments

Comments
 (0)