aboutsummaryrefslogtreecommitdiff
path: root/launcher/ui
diff options
context:
space:
mode:
Diffstat (limited to 'launcher/ui')
-rw-r--r--launcher/ui/dialogs/BlockedModsDialog.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/launcher/ui/dialogs/BlockedModsDialog.cpp b/launcher/ui/dialogs/BlockedModsDialog.cpp
index 346ceff2..8b49bd1a 100644
--- a/launcher/ui/dialogs/BlockedModsDialog.cpp
+++ b/launcher/ui/dialogs/BlockedModsDialog.cpp
@@ -84,7 +84,15 @@ void BlockedModsDialog::dragEnterEvent(QDragEnterEvent* e)
void BlockedModsDialog::dropEvent(QDropEvent* e)
{
- for (const QUrl& url : e->mimeData()->urls()) {
+ for (QUrl& url : e->mimeData()->urls()) {
+ if (url.scheme().isEmpty()) { // ensure isLocalFile() works correctly
+ url.setScheme("file");
+ }
+
+ if (!url.isLocalFile()) { // can't drop external files here.
+ continue;
+ }
+
QString filePath = url.toLocalFile();
qDebug() << "[Blocked Mods Dialog] Dropped file:" << filePath;
addHashTask(filePath);