diff --git a/dangerzone/gui/main_window.py b/dangerzone/gui/main_window.py index d0e2ee45d..8e9fedf1a 100644 --- a/dangerzone/gui/main_window.py +++ b/dangerzone/gui/main_window.py @@ -682,10 +682,11 @@ def dragLeaveEvent(self, ev: QtGui.QDragLeaveEvent) -> None: def dropEvent(self, ev: QtGui.QDropEvent) -> None: ev.setDropAction(QtCore.Qt.CopyAction) documents = [] + supported_exts = get_supported_extensions() for url_path in ev.mimeData().urls(): doc_path = url_path.toLocalFile() doc_ext = os.path.splitext(doc_path)[1] - if doc_ext in get_supported_extensions(): + if doc_ext in supported_exts: documents += [Document(doc_path)] # Ignore anything dropped that's not a file (e.g. text)