From dd3ed4cf463501766d7a068966760d3be10d95a4 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Sun, 18 Oct 2015 19:37:11 +0000 Subject: [PATCH] * simplify error messages if setting xattr fails --- source/net/filebot/media/MediaDetection.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/net/filebot/media/MediaDetection.java b/source/net/filebot/media/MediaDetection.java index 033ed438..bc735634 100644 --- a/source/net/filebot/media/MediaDetection.java +++ b/source/net/filebot/media/MediaDetection.java @@ -1514,6 +1514,9 @@ public class MediaDetection { } } } catch (Exception e) { + if (e instanceof RuntimeException && e.getCause() instanceof IOException) { + e = (IOException) e.getCause(); + } Logger.getLogger(MediaDetection.class.getClass().getName()).warning("Failed to set creation date: " + e.getMessage()); } } @@ -1528,6 +1531,9 @@ public class MediaDetection { xattr.setOriginalName(original); } } catch (Exception e) { + if (e instanceof RuntimeException && e.getCause() instanceof IOException) { + e = (IOException) e.getCause(); + } Logger.getLogger(MediaDetection.class.getClass().getName()).warning("Failed to set xattr: " + e.getMessage()); } }