mirror of
https://github.com/mitb-archive/filebot
synced 2024-12-21 23:38:50 -05:00
* complete dnd support for ubuntu :D
This commit is contained in:
parent
036eefc5b9
commit
9053df6316
@ -53,7 +53,7 @@ public class FileTransferable implements Transferable {
|
||||
StringBuffer sb = new StringBuffer();
|
||||
|
||||
for (File file : files) {
|
||||
sb.append(file.toURI());
|
||||
sb.append("file:///" + file.toURI().getPath());
|
||||
sb.append("\r\n");
|
||||
}
|
||||
|
||||
|
@ -39,7 +39,7 @@ public abstract class FileTransferablePolicy extends TransferablePolicy {
|
||||
if (tr.isDataFlavorSupported(DataFlavor.javaFileListFlavor)) {
|
||||
return (List<File>) tr.getTransferData(DataFlavor.javaFileListFlavor);
|
||||
} else if (tr.isDataFlavorSupported(FileBotUtil.uriListFlavor)) {
|
||||
String transferString = (String) tr.getTransferData(DataFlavor.stringFlavor);
|
||||
String transferString = (String) tr.getTransferData(FileBotUtil.uriListFlavor);
|
||||
|
||||
String lines[] = transferString.split("\r?\n");
|
||||
ArrayList<File> files = new ArrayList<File>(lines.length);
|
||||
@ -57,9 +57,11 @@ public abstract class FileTransferablePolicy extends TransferablePolicy {
|
||||
files.add(file);
|
||||
} catch (Exception e) {
|
||||
// URISyntaxException, IllegalArgumentException
|
||||
Logger.getLogger(Logger.GLOBAL_LOGGER_NAME).log(Level.WARNING, "Invalid file url: " + line, e);
|
||||
Logger.getLogger(Logger.GLOBAL_LOGGER_NAME).log(Level.WARNING, "Invalid file url: " + line);
|
||||
}
|
||||
}
|
||||
|
||||
return files;
|
||||
}
|
||||
} catch (UnsupportedFlavorException e) {
|
||||
e.printStackTrace();
|
||||
|
Loading…
Reference in New Issue
Block a user