diff --git a/src/libraries/System.IO.Compression.ZipFile/src/System/IO/Compression/ZipFile.Create.cs b/src/libraries/System.IO.Compression.ZipFile/src/System/IO/Compression/ZipFile.Create.cs index ba088ab15d024..5cd64ca6156bd 100644 --- a/src/libraries/System.IO.Compression.ZipFile/src/System/IO/Compression/ZipFile.Create.cs +++ b/src/libraries/System.IO.Compression.ZipFile/src/System/IO/Compression/ZipFile.Create.cs @@ -459,10 +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 - - // 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. + // Rely on Path.GetFullPath for validation of sourceDirectoryName sourceDirectoryName = Path.GetFullPath(sourceDirectoryName);