summaryrefslogtreecommitdiffstats
path: root/application/MainWindow.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2015-04-26 00:01:41 +0200
committerPetr Mrázek <peterix@gmail.com>2015-04-26 00:01:41 +0200
commitf623dc54efc505264ab40746b284289435a2ec26 (patch)
treea0253369715afa1faed99fbc574365f518ea3c5e /application/MainWindow.cpp
parentdc279fbfdc01c7653ae3e70a870c4a0c0f08c263 (diff)
downloadMultiMC-f623dc54efc505264ab40746b284289435a2ec26.tar
MultiMC-f623dc54efc505264ab40746b284289435a2ec26.tar.gz
MultiMC-f623dc54efc505264ab40746b284289435a2ec26.tar.lz
MultiMC-f623dc54efc505264ab40746b284289435a2ec26.tar.xz
MultiMC-f623dc54efc505264ab40746b284289435a2ec26.zip
GH-909 warn about MultiMC running from temporary folders
Diffstat (limited to 'application/MainWindow.cpp')
-rw-r--r--application/MainWindow.cpp29
1 files changed, 25 insertions, 4 deletions
diff --git a/application/MainWindow.cpp b/application/MainWindow.cpp
index 8b85f1ce..8084f361 100644
--- a/application/MainWindow.cpp
+++ b/application/MainWindow.cpp
@@ -1958,15 +1958,36 @@ void MainWindow::checkInstancePathForProblems()
QString instanceFolder = MMC->settings()->get("InstanceDir").toString();
if (checkProblemticPathJava(QDir(instanceFolder)))
{
- QMessageBox warning;
+ QMessageBox warning(this);
warning.setText(tr(
"Your instance folder contains \'!\' and this is known to cause Java problems!"));
warning.setInformativeText(
- tr("You have now three options: <br/>"
- " - ignore this warning <br/>"
- " - change the instance dir in the settings <br/>"
+ tr("You have now two options: <br/>"
+ " - change the instance folder in the settings <br/>"
" - move this installation of MultiMC5 to a different folder"));
warning.setDefaultButton(QMessageBox::Ok);
warning.exec();
}
+ auto tempFolderText = tr("This is a problem: <br/>"
+ " - MultiMC will likely be deleted without warning by the operating system <br/>"
+ " - close MultiMC now and extract it to a real location, not a temporary folder");
+ QString pathfoldername = QDir(instanceFolder).absolutePath();
+ if(pathfoldername.contains("Rar$", Qt::CaseInsensitive))
+ {
+ QMessageBox warning(this);
+ warning.setText(tr(
+ "Your instance folder contains \'Rar$\' - that means you haven't extracted the MultiMC zip!"));
+ warning.setInformativeText(tempFolderText);
+ warning.setDefaultButton(QMessageBox::Ok);
+ warning.exec();
+ }
+ else if(pathfoldername.contains(QDir::tempPath()))
+ {
+ QMessageBox warning(this);
+ warning.setText(tr(
+ "Your instance folder is in a temporary folder: \'%1\'!").arg(QDir::tempPath()));
+ warning.setInformativeText(tempFolderText);
+ warning.setDefaultButton(QMessageBox::Ok);
+ warning.exec();
+ }
}