diff --git a/.woodpecker/package.yml b/.woodpecker/package.yml new file mode 100644 index 0000000..a9983cf --- /dev/null +++ b/.woodpecker/package.yml @@ -0,0 +1,5 @@ +steps: + - name: package + image: maven:3.9.9-eclipse-temurin-21-alpine + commands: + - mvn package \ No newline at end of file diff --git a/.woodpecker/test.yml b/.woodpecker/test.yml new file mode 100644 index 0000000..ef321e8 --- /dev/null +++ b/.woodpecker/test.yml @@ -0,0 +1,5 @@ +steps: + - name: test + image: maven:3.9.9-eclipse-temurin-21-alpine + commands: + - mvn test \ No newline at end of file diff --git a/src/main/java/solutions/reslate/entertainment/spigotresourcesync/synchronisation/ApacheCommonsIOSynchroniser.java b/src/main/java/solutions/reslate/entertainment/spigotresourcesync/synchronisation/ApacheCommonsIOSynchroniser.java index 686a007..87af492 100644 --- a/src/main/java/solutions/reslate/entertainment/spigotresourcesync/synchronisation/ApacheCommonsIOSynchroniser.java +++ b/src/main/java/solutions/reslate/entertainment/spigotresourcesync/synchronisation/ApacheCommonsIOSynchroniser.java @@ -15,16 +15,11 @@ public class ApacheCommonsIOSynchroniser implements Synchroniser { source = Path.of(root.getPath(), dest.getPath()).toFile(); } - if (source.exists() && dest.exists()) { - dest.delete(); - // Fixes an issue where sometimes, Apache Commons IO will fail to overwrite. - } - if (source.isDirectory()) { if (dest.isDirectory()) { FileUtils.copyDirectory(source, dest); } else { - throw new IOException("Cannot synchronise directy to non-directory!"); + throw new IOException("Cannot synchronise directory to non-directory!"); // TODO add more detail to error message. } } else {