From b2f2e9db8aa964fcf73a437d857f3e4badcd277a Mon Sep 17 00:00:00 2001 From: Zach H Date: Tue, 7 Mar 2017 12:48:07 -0500 Subject: [PATCH] make sure xml file is uploaded (#2440) --- cockatrice/src/window_main.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cockatrice/src/window_main.cpp b/cockatrice/src/window_main.cpp index 11a69852..79b7b7cf 100644 --- a/cockatrice/src/window_main.cpp +++ b/cockatrice/src/window_main.cpp @@ -1031,6 +1031,11 @@ void MainWindow::actAddCustomSet() return; } + if (QFileInfo(fileName).suffix() != "xml") { // fileName = *.xml + QMessageBox::warning(this, tr("Load sets/cards"), tr("You can only import XML databases at this time.")); + return; + } + QDir dir = settingsCache->getCustomCardDatabasePath(); int nextPrefix = getNextCustomSetPrefix(dir);