diff options
author | Loetkolben <sirloetkolben@gmail.com> | 2014-07-27 15:50:03 +0200 |
---|---|---|
committer | Jan Dalheimer <jan@dalheimer.de> | 2014-07-30 21:40:18 +0200 |
commit | c0254d9a75a1f0f784a3e9b6874475b2c2a3ab8f (patch) | |
tree | 113e3561122c70b51e97b530c8055bdf91533cb8 /depends/util/src | |
parent | e5b393318fb2a143c9520928dd45c697af68f498 (diff) | |
download | MultiMC-c0254d9a75a1f0f784a3e9b6874475b2c2a3ab8f.tar MultiMC-c0254d9a75a1f0f784a3e9b6874475b2c2a3ab8f.tar.gz MultiMC-c0254d9a75a1f0f784a3e9b6874475b2c2a3ab8f.tar.lz MultiMC-c0254d9a75a1f0f784a3e9b6874475b2c2a3ab8f.tar.xz MultiMC-c0254d9a75a1f0f784a3e9b6874475b2c2a3ab8f.zip |
Show a warning if the instance path contains a '!'
The checks and warnings happen the time MMC loads (via QLOG_INFO), the time the GUI starts (via a dialog) and when the user changes the instance path via the settings window.
Diffstat (limited to 'depends/util/src')
-rw-r--r-- | depends/util/src/pathutils.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/depends/util/src/pathutils.cpp b/depends/util/src/pathutils.cpp index 1d09fe45..ba66898e 100644 --- a/depends/util/src/pathutils.cpp +++ b/depends/util/src/pathutils.cpp @@ -144,3 +144,11 @@ void openFileInDefaultProgram(QString filename) { QDesktopServices::openUrl(QUrl::fromLocalFile(filename)); } + +// Does the directory path contain any '!'? If yes, return true, otherwise false. +// (This is a problem for Java) +bool checkProblemticPathJava(QDir folder) +{ + QString pathfoldername = folder.absolutePath(); + return pathfoldername.contains("!", Qt::CaseInsensitive); +} |