1
0
mirror of https://github.com/mitb-archive/filebot synced 2025-03-10 06:20:27 -04:00

* fix Linux uriList flavour issues

This commit is contained in:
Reinhard Pointner 2012-11-25 12:52:08 +00:00
parent f1b59c0a4a
commit 8592525cfb
2 changed files with 4 additions and 3 deletions

View File

@ -132,7 +132,7 @@ public class FileTransferable implements Transferable {
} }
if (file == null || !file.exists()) { if (file == null || !file.exists()) {
throw new FileNotFoundException(line); throw new FileNotFoundException(file != null ? file.getPath() : line);
} }
files.add(file); files.add(file);
@ -140,8 +140,9 @@ public class FileTransferable implements Transferable {
// URISyntaxException, IllegalArgumentException, FileNotFoundException, LinkageError, etc // URISyntaxException, IllegalArgumentException, FileNotFoundException, LinkageError, etc
Logger.getLogger(FileTransferable.class.getName()).log(Level.WARNING, "Invalid file URI: " + line); Logger.getLogger(FileTransferable.class.getName()).log(Level.WARNING, "Invalid file URI: " + line);
} }
return files;
} }
return files;
} else if (tr.isDataFlavorSupported(DataFlavor.javaFileListFlavor)) { } else if (tr.isDataFlavorSupported(DataFlavor.javaFileListFlavor)) {
// file list flavor // file list flavor
return (List<File>) tr.getTransferData(DataFlavor.javaFileListFlavor); return (List<File>) tr.getTransferData(DataFlavor.javaFileListFlavor);

View File

@ -33,7 +33,7 @@ public abstract class TransferablePolicy {
// just assume that the transferable will be accepted, accept will be called in importData again anyway // just assume that the transferable will be accepted, accept will be called in importData again anyway
return true; return true;
} catch (Exception e) { } catch (Exception e) {
Logger.getLogger(getClass().getName()).log(Level.WARNING, e.toString(), e); Logger.getLogger(getClass().getName()).log(Level.WARNING, e.toString());
return false; return false;
} }
} }