From 7ac1eeb5a42beb5e691277b2213af0911c3f94a9 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Fri, 26 Oct 2012 19:13:08 +0000 Subject: [PATCH] * respect xattr settings --- .../sourceforge/filebot/format/MediaBindingBean.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/source/net/sourceforge/filebot/format/MediaBindingBean.java b/source/net/sourceforge/filebot/format/MediaBindingBean.java index b449d69e..011a35e2 100644 --- a/source/net/sourceforge/filebot/format/MediaBindingBean.java +++ b/source/net/sourceforge/filebot/format/MediaBindingBean.java @@ -5,6 +5,7 @@ package net.sourceforge.filebot.format; import static java.util.Arrays.*; import static java.util.Collections.*; import static net.sourceforge.filebot.MediaTypes.*; +import static net.sourceforge.filebot.Settings.*; import static net.sourceforge.filebot.format.Define.*; import static net.sourceforge.filebot.hash.VerificationUtilities.*; import static net.sourceforge.filebot.media.MediaDetection.*; @@ -629,11 +630,14 @@ public class MediaBindingBean { private String getOriginalFileName(File file) { - try { - return new MetaAttributes(file).getOriginalName(); - } catch (Throwable e) { - return null; + if (useExtendedFileAttributes()) { + try { + return new MetaAttributes(file).getOriginalName(); + } catch (Throwable e) { + // ignore + } } + return null; } }