This commit is contained in:
Szum123321 2020-06-30 15:50:16 +02:00
parent 708659b5dd
commit 3e17a64714

View File

@ -16,6 +16,13 @@ public class Utilities {
}
public static boolean isBlacklisted(Path path) {
if(isWindows()) { //hotfix!
if (path.getFileName().toString().equals("session.lock")) {
TextileBackup.LOGGER.trace("Skipping session.lock");
return true;
}
}
for(String i : TextileBackup.config.fileBlacklist) {
if(path.startsWith(i))
return true;
@ -24,6 +31,10 @@ public class Utilities {
return false;
}
public static boolean isWindows() {
return System.getProperty("os.name").toLowerCase().contains("win");
}
public static DateTimeFormatter getDateTimeFormatter(){
if(!TextileBackup.config.dateTimeFormat.equals(""))
return DateTimeFormatter.ofPattern(TextileBackup.config.dateTimeFormat);