From c0c858e25dd517a050501bf5defb92a977383fd6 Mon Sep 17 00:00:00 2001 From: labkey-jeckels Date: Wed, 5 Nov 2025 14:21:19 -0800 Subject: [PATCH] Handle paths, not just file names, when extracting zips in test code --- src/org/labkey/test/TestFileUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/org/labkey/test/TestFileUtils.java b/src/org/labkey/test/TestFileUtils.java index b72bc9a74c..d73ad973a1 100644 --- a/src/org/labkey/test/TestFileUtils.java +++ b/src/org/labkey/test/TestFileUtils.java @@ -564,7 +564,7 @@ public static List unzipToDirectory(File sourceZip, File unzipDir) throws while (null != (entry = zis.getNextEntry())) { - File destFile = FileUtil.appendName(unzipDir, entry.getName()); + File destFile = FileUtil.appendPath(unzipDir, org.labkey.api.util.Path.parse(entry.getName())); if (!destFile.getCanonicalPath().startsWith(unzipDir.getCanonicalPath() + File.separator)) { throw new IOException("Zip entry is outside of the target dir: " + entry.getName());