From bb5d5b0d156f1d4fef7ba2d521d13d8c6a80a8b1 Mon Sep 17 00:00:00 2001
From: Gero Lueckemeyer <gero.lueckemeyer@hft-stuttgart.de>
Date: Mon, 5 Feb 2024 10:40:03 +0100
Subject: [PATCH] re-created target dir for copy

---
 src/main/java/de/hftstuttgart/dtabackend/utils/JGitUtil.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/main/java/de/hftstuttgart/dtabackend/utils/JGitUtil.java b/src/main/java/de/hftstuttgart/dtabackend/utils/JGitUtil.java
index 19ad406..8122583 100644
--- a/src/main/java/de/hftstuttgart/dtabackend/utils/JGitUtil.java
+++ b/src/main/java/de/hftstuttgart/dtabackend/utils/JGitUtil.java
@@ -58,9 +58,11 @@ public class JGitUtil {
             //if an optional directory parameter was given
             if(subDir!="")
             {
+            	targetDirectory = new File(targetPath);
             	//copy appropriate path from checkout directory to target directory
             	FileSystemUtils.copyRecursively(targetDirectory, new File(checkoutDirectory+subDir));
             }
+            LOG.debug(String.format("cloned from %s to %s", config.group(1), targetDirectory));            
         }
         catch (IOException e) {
         	LOG.error(String.format("Error while cloning from %s: could not copy to unit test dir", config.group(1)), e);
@@ -68,7 +70,5 @@ public class JGitUtil {
         catch (GitAPIException e) {
             LOG.error(String.format("Error while cloning from %s: could not read from Git", config.group(1)), e);
         }
-
-        LOG.debug(String.format("cloned from %s to %s", config.group(1), targetDirectory));
     }
 }
-- 
GitLab