summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--api/logic/BaseInstance.cpp2
-rw-r--r--api/logic/FileSystem.cpp2
-rw-r--r--libraries/launcher/org/multimc/EntryPoint.java6
-rw-r--r--libraries/launcher/org/multimc/ParseException.java5
4 files changed, 9 insertions, 6 deletions
diff --git a/api/logic/BaseInstance.cpp b/api/logic/BaseInstance.cpp
index 098407dc..7ddcc549 100644
--- a/api/logic/BaseInstance.cpp
+++ b/api/logic/BaseInstance.cpp
@@ -244,7 +244,7 @@ QString BaseInstance::name() const
QString BaseInstance::windowTitle() const
{
- return "MultiMC: " + name();
+ return "MultiMC: " + name().replace(QRegExp("[ \n\r\t]+"), " ");
}
// FIXME: why is this here? move it to MinecraftInstance!!!
diff --git a/api/logic/FileSystem.cpp b/api/logic/FileSystem.cpp
index 7e3c1841..192d868b 100644
--- a/api/logic/FileSystem.cpp
+++ b/api/logic/FileSystem.cpp
@@ -294,7 +294,7 @@ QString NormalizePath(QString path)
}
}
-QString badFilenameChars = "\"\\/?<>:*|!+";
+QString badFilenameChars = "\"\\/?<>:*|!+\r\n";
QString RemoveInvalidFilenameChars(QString string, QChar replaceWith)
{
diff --git a/libraries/launcher/org/multimc/EntryPoint.java b/libraries/launcher/org/multimc/EntryPoint.java
index c4ae2a86..2a07d20b 100644
--- a/libraries/launcher/org/multimc/EntryPoint.java
+++ b/libraries/launcher/org/multimc/EntryPoint.java
@@ -52,11 +52,11 @@ public class EntryPoint
else if (pair[0].equals("abort"))
return Action.Abort;
- else throw new ParseException();
+ else throw new ParseException("Error while parsing:" + pair[0]);
}
if(pair.length != 2)
- throw new ParseException();
+ throw new ParseException("Pair length is not 2.");
String command = pair[0];
String param = pair[1];
@@ -71,7 +71,7 @@ public class EntryPoint
return Action.Proceed;
}
else
- throw new ParseException();
+ throw new ParseException("Invalid launcher type: " + param);
}
m_params.add(command, param);
diff --git a/libraries/launcher/org/multimc/ParseException.java b/libraries/launcher/org/multimc/ParseException.java
index 9a8fe521..1af01a5c 100644
--- a/libraries/launcher/org/multimc/ParseException.java
+++ b/libraries/launcher/org/multimc/ParseException.java
@@ -18,5 +18,8 @@ package org.multimc;
public class ParseException extends java.lang.Exception
{
-
+ public ParseException() { super(); }
+ public ParseException(String message) {
+ super(message);
+ }
}