Repaired #20
This commit is contained in:
parent
708659b5dd
commit
3e17a64714
@ -16,6 +16,13 @@ public class Utilities {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isBlacklisted(Path path) {
|
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) {
|
for(String i : TextileBackup.config.fileBlacklist) {
|
||||||
if(path.startsWith(i))
|
if(path.startsWith(i))
|
||||||
return true;
|
return true;
|
||||||
@ -24,6 +31,10 @@ public class Utilities {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean isWindows() {
|
||||||
|
return System.getProperty("os.name").toLowerCase().contains("win");
|
||||||
|
}
|
||||||
|
|
||||||
public static DateTimeFormatter getDateTimeFormatter(){
|
public static DateTimeFormatter getDateTimeFormatter(){
|
||||||
if(!TextileBackup.config.dateTimeFormat.equals(""))
|
if(!TextileBackup.config.dateTimeFormat.equals(""))
|
||||||
return DateTimeFormatter.ofPattern(TextileBackup.config.dateTimeFormat);
|
return DateTimeFormatter.ofPattern(TextileBackup.config.dateTimeFormat);
|
||||||
|
Loading…
Reference in New Issue
Block a user