From d32b3e8f0ca4790bad2a2731c3a650d5f11a4394 Mon Sep 17 00:00:00 2001 From: Szum123321 Date: Thu, 8 Jun 2023 22:57:18 +0200 Subject: [PATCH] repaired if condition causing crashes on windows --- .../java/net/szum123321/textile_backup/core/Utilities.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/szum123321/textile_backup/core/Utilities.java b/src/main/java/net/szum123321/textile_backup/core/Utilities.java index 7d82400..7f26456 100644 --- a/src/main/java/net/szum123321/textile_backup/core/Utilities.java +++ b/src/main/java/net/szum123321/textile_backup/core/Utilities.java @@ -115,9 +115,11 @@ public class Utilities { } public static boolean isBlacklisted(Path path) { - if (path.getFileName().equals("session.lock")) return true; + log.info(path.getFileName().toString()); + if (path.getFileName().equals(Path.of("session.lock"))) return true; + log.info(path.getFileName().toString()); - if(path.getFileName().endsWith(CompressionStatus.DATA_FILENAME)) return true; + if(path.getFileName().equals(Path.of(CompressionStatus.DATA_FILENAME))) return true; return config.get().fileBlacklist.stream().anyMatch(path::startsWith); }