make sure xml file is uploaded (#2440)

This commit is contained in:
Zach H 2017-03-07 12:48:07 -05:00 committed by GitHub
parent 88b4e768c4
commit b2f2e9db8a

View file

@ -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);