mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-09-14 22:37:06 -04:00
Prevent launching in path that contains !
This commit is contained in:
parent
ca627b8a2d
commit
fabb6b50b4
@ -101,6 +101,11 @@ public final class Main {
|
|||||||
|
|
||||||
public static void main(String[] args) throws IOException {
|
public static void main(String[] args) throws IOException {
|
||||||
{
|
{
|
||||||
|
if (new File("").getAbsolutePath().contains("!")) {
|
||||||
|
MessageBox.show("HMCL cannot run at such path that contains '!'");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
File file = new File("hmcl.log").getAbsoluteFile();
|
File file = new File("hmcl.log").getAbsoluteFile();
|
||||||
if (!file.exists() && !file.createNewFile())
|
if (!file.exists() && !file.createNewFile())
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see {http://www.gnu.org/licenses/}.
|
* along with this program. If not, see {http://www.gnu.org/licenses/}.
|
||||||
*/
|
*/
|
||||||
rootProject.name = 'Hello Minecraft!'
|
rootProject.name = 'Hello Minecraft'
|
||||||
|
|
||||||
// Find the directories containing a "build.gradle" file in the root directory
|
// Find the directories containing a "build.gradle" file in the root directory
|
||||||
// of the project. That is, every directory containing a "build.gradle" will
|
// of the project. That is, every directory containing a "build.gradle" will
|
||||||
|
Loading…
x
Reference in New Issue
Block a user