From 8177a0959ab5ad18f23065cf623e7a90ea39db9f Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Tue, 5 Apr 2016 18:06:14 +0000 Subject: [PATCH] Fix bugs --- source/net/filebot/media/ReleaseInfo.properties | 2 +- source/net/filebot/util/FastFile.java | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/source/net/filebot/media/ReleaseInfo.properties b/source/net/filebot/media/ReleaseInfo.properties index 409e82cc..50689308 100644 --- a/source/net/filebot/media/ReleaseInfo.properties +++ b/source/net/filebot/media/ReleaseInfo.properties @@ -47,4 +47,4 @@ pattern.diskfolder.entry: BDMV|HVDVD_TS|VIDEO_TS|AUDIO_TS|VCD|MovieObject.bdmv|V folder.media.roots: /Volumes:/Users:/home:/mnt:/media # system file pattern -pattern.system.files: [.@].+|bin|initrd|opt|sbin|var|dev|lib|proc|sys|var.defaults|etc|lost.found|root|tmp|etc.defaults|mnt|run|usr|System.Volume.Information +pattern.system.files: [.@][a-z]+|bin|initrd|opt|sbin|var|dev|lib|proc|sys|var.defaults|etc|lost.found|root|tmp|etc.defaults|mnt|run|usr|System.Volume.Information diff --git a/source/net/filebot/util/FastFile.java b/source/net/filebot/util/FastFile.java index d03d6eff..c5839ed3 100644 --- a/source/net/filebot/util/FastFile.java +++ b/source/net/filebot/util/FastFile.java @@ -58,12 +58,12 @@ public class FastFile extends File { @Override public File getCanonicalFile() throws IOException { - return canonicalFile != null ? canonicalFile : (canonicalFile = new FastFile(super.getCanonicalFile())); + return canonicalFile != null ? canonicalFile : (canonicalFile = get(super.getCanonicalFile())); } @Override public File getParentFile() { - return parentFile != null ? parentFile : (parentFile = new FastFile(super.getParentFile())); + return parentFile != null ? parentFile : (parentFile = get(super.getParentFile())); } @Override @@ -209,4 +209,8 @@ public class FastFile extends File { throw new UnsupportedOperationException(); } + public static FastFile get(File f) { + return f == null ? null : new FastFile(f); + } + }