From cc190c9784ab5ee7b3e2ceb3bbb588a9097fe3f1 Mon Sep 17 00:00:00 2001 From: lgoubet Date: Tue, 24 Nov 2020 15:21:06 +0100 Subject: [PATCH] Make sure folders are created when extracting input files Change-Id: Id1daac07074ad73963c01f9f7af80936d8ab4125 --- .../tests/git/framework/internal/statements/InternalGitTestSupport.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/org.eclipse.emf.compare.ide.ui.tests.git.framework/src/org/eclipse/emf/compare/ide/ui/tests/git/framework/internal/statements/InternalGitTestSupport.java b/plugins/org.eclipse.emf.compare.ide.ui.tests.git.framework/src/org/eclipse/emf/compare/ide/ui/tests/git/framework/internal/statements/InternalGitTestSupport.java index 955ac08e7..690ce1d6c 100644 --- a/plugins/org.eclipse.emf.compare.ide.ui.tests.git.framework/src/org/eclipse/emf/compare/ide/ui/tests/git/framework/internal/statements/InternalGitTestSupport.java +++ b/plugins/org.eclipse.emf.compare.ide.ui.tests.git.framework/src/org/eclipse/emf/compare/ide/ui/tests/git/framework/internal/statements/InternalGitTestSupport.java @@ -264,6 +264,8 @@ public class InternalGitTestSupport { * Thrown if something happen during the extraction */ private void extractFile(ZipInputStream zipIn, String filePath) throws IOException { + File file = new File(filePath); + file.getParentFile().mkdirs(); try (BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(filePath));) { byte[] bytesIn = new byte[BUFFER_SIZE]; int read = 0; -- 2.11.4.GIT