Fix extract out of directory (dotnet/corefx#32127)
authorJeremy Kuhne <jeremy.kuhne@microsoft.com>
Fri, 7 Sep 2018 00:35:52 +0000 (17:35 -0700)
committerGitHub <noreply@github.com>
Fri, 7 Sep 2018 00:35:52 +0000 (17:35 -0700)
commite101d4d063a97d34e229ac3e193f03d403bb10cd
tree1579b4e405492084dd7e8ea98edbca7137b19c6b
parenta903bdf742594826ce4aece7b3cc2c93c167662c
Fix extract out of directory (dotnet/corefx#32127)

* Fix extract out of directory

Without ensuring a trailing directory separator you cannot compare paths for nesting.  `/Foo/Bar` does not contain `/Foo/Barber`, but does contain `/Foo/Bar/Bell`. This adds the separator and tests.

* Skip new test on NetFX

Commit migrated from https://github.com/dotnet/corefx/commit/a0fcd23ace1c8d692988cd0da4391cf7bf5e0ce6
src/libraries/System.IO.Compression.ZipFile/src/System/IO/Compression/ZipFileExtensions.ZipArchiveEntry.Extract.cs
src/libraries/System.IO.Compression.ZipFile/tests/ZipFile.Extract.cs