From 8592525cfbfd20687a514384d8d5ccb80b98b14b Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Sun, 25 Nov 2012 12:52:08 +0000 Subject: [PATCH] * fix Linux uriList flavour issues --- .../sourceforge/filebot/ui/transfer/FileTransferable.java | 5 +++-- .../sourceforge/filebot/ui/transfer/TransferablePolicy.java | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/source/net/sourceforge/filebot/ui/transfer/FileTransferable.java b/source/net/sourceforge/filebot/ui/transfer/FileTransferable.java index c3a70f8e..e913dc19 100644 --- a/source/net/sourceforge/filebot/ui/transfer/FileTransferable.java +++ b/source/net/sourceforge/filebot/ui/transfer/FileTransferable.java @@ -132,7 +132,7 @@ public class FileTransferable implements Transferable { } if (file == null || !file.exists()) { - throw new FileNotFoundException(line); + throw new FileNotFoundException(file != null ? file.getPath() : line); } files.add(file); @@ -140,8 +140,9 @@ public class FileTransferable implements Transferable { // URISyntaxException, IllegalArgumentException, FileNotFoundException, LinkageError, etc Logger.getLogger(FileTransferable.class.getName()).log(Level.WARNING, "Invalid file URI: " + line); } - return files; } + + return files; } else if (tr.isDataFlavorSupported(DataFlavor.javaFileListFlavor)) { // file list flavor return (List) tr.getTransferData(DataFlavor.javaFileListFlavor); diff --git a/source/net/sourceforge/filebot/ui/transfer/TransferablePolicy.java b/source/net/sourceforge/filebot/ui/transfer/TransferablePolicy.java index d99d83fa..46212e63 100644 --- a/source/net/sourceforge/filebot/ui/transfer/TransferablePolicy.java +++ b/source/net/sourceforge/filebot/ui/transfer/TransferablePolicy.java @@ -33,7 +33,7 @@ public abstract class TransferablePolicy { // just assume that the transferable will be accepted, accept will be called in importData again anyway return true; } catch (Exception e) { - Logger.getLogger(getClass().getName()).log(Level.WARNING, e.toString(), e); + Logger.getLogger(getClass().getName()).log(Level.WARNING, e.toString()); return false; } }