repaired if condition causing crashes on windows

This commit is contained in:
Szum123321 2023-06-08 22:57:18 +02:00
parent 8d3dd3f012
commit d32b3e8f0c

View File

@ -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);
}