Mac OS has a symlink in the tmp dir that gets created in the test for
ZipSlip. Using real paths prevents the test test from failing by using
actual paths instead of a potentially different symlinked path to the
canonical path.
Issue-ID: SDC-2887
Signed-off-by: neil.derraugh <neil.derraugh@yoppworks.com>
Change-Id: Iafb0a84f6ab68276c5782c1ef716c59435aa72f5
@Test
public void testUnzipAndZip() throws IOException, ZipException {
- final Path unzipTempPath = Files.createTempDirectory("testUnzip");
- final Path zipTempPath = Files.createTempDirectory("testZip");
+ final Path unzipTempPath = Files.createTempDirectory("testUnzip").toRealPath();
+ final Path zipTempPath = Files.createTempDirectory("testZip").toRealPath();
final Path testZipPath;
try {
try {