GH-909 warn about MultiMC running from temporary folders
This commit is contained in:
parent
dc279fbfdc
commit
f623dc54ef
@ -1958,15 +1958,36 @@ void MainWindow::checkInstancePathForProblems()
|
|||||||
QString instanceFolder = MMC->settings()->get("InstanceDir").toString();
|
QString instanceFolder = MMC->settings()->get("InstanceDir").toString();
|
||||||
if (checkProblemticPathJava(QDir(instanceFolder)))
|
if (checkProblemticPathJava(QDir(instanceFolder)))
|
||||||
{
|
{
|
||||||
QMessageBox warning;
|
QMessageBox warning(this);
|
||||||
warning.setText(tr(
|
warning.setText(tr(
|
||||||
"Your instance folder contains \'!\' and this is known to cause Java problems!"));
|
"Your instance folder contains \'!\' and this is known to cause Java problems!"));
|
||||||
warning.setInformativeText(
|
warning.setInformativeText(
|
||||||
tr("You have now three options: <br/>"
|
tr("You have now two options: <br/>"
|
||||||
" - ignore this warning <br/>"
|
" - change the instance folder in the settings <br/>"
|
||||||
" - change the instance dir in the settings <br/>"
|
|
||||||
" - move this installation of MultiMC5 to a different folder"));
|
" - move this installation of MultiMC5 to a different folder"));
|
||||||
warning.setDefaultButton(QMessageBox::Ok);
|
warning.setDefaultButton(QMessageBox::Ok);
|
||||||
warning.exec();
|
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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user