mirror of
https://github.com/mitb-archive/filebot
synced 2025-03-09 22:09:47 -04:00
Refactor File DnD (and assume that "java.io.IOException: Owner failed to convert data" is normal during the DnD process and can be ignored)
This commit is contained in:
parent
a4c3ac9faa
commit
9fb947bbfd
@ -89,7 +89,7 @@ public class FileTransferable implements Transferable {
|
|||||||
return isFileListFlavor(flavor);
|
return isFileListFlavor(flavor);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static <T> T getTransferData(Transferable tr, DataFlavor flavor, Class<T> type) throws IOException, UnsupportedFlavorException {
|
public static <T> T getTransferData(Transferable tr, DataFlavor flavor, Class<T> type) throws IOException, UnsupportedFlavorException, InvalidDnDOperationException {
|
||||||
Object transferData;
|
Object transferData;
|
||||||
try {
|
try {
|
||||||
transferData = tr.getTransferData(flavor);
|
transferData = tr.getTransferData(flavor);
|
||||||
|
@ -27,7 +27,6 @@ public abstract class TransferablePolicy {
|
|||||||
// *after* the drop has been accepted, but canImport is called before that
|
// *after* the drop has been accepted, but canImport is called before that
|
||||||
|
|
||||||
// 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
|
||||||
debug.log(Level.FINEST, e::toString);
|
|
||||||
return true;
|
return true;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
debug.log(Level.WARNING, e, e::getMessage);
|
debug.log(Level.WARNING, e, e::getMessage);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user