From 24bed23fdd542e19d0fd5e1d7f8b8b440ce51060 Mon Sep 17 00:00:00 2001 From: Garux Date: Wed, 2 Sep 2020 11:21:42 +0300 Subject: [PATCH] emit error on non ASCII home or radiant path --- radiant/main.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/radiant/main.cpp b/radiant/main.cpp index 53ffdbd4..a3551ade 100644 --- a/radiant/main.cpp +++ b/radiant/main.cpp @@ -88,6 +88,7 @@ #include "environment.h" #include "referencecache.h" #include "stacktrace.h" +#include "error.h" #ifdef WIN32 #include @@ -328,6 +329,10 @@ void streams_init(){ void paths_init(){ const char* home = environment_get_home_path(); + + if( !g_str_is_ascii( home ) ) + Error( "Home path is not ASCII: %s", home ); + Q_mkdir( home ); { @@ -340,6 +345,9 @@ void paths_init(){ g_strAppPath = environment_get_app_path(); + if( !g_str_is_ascii( g_strAppPath.c_str() ) ) + Error( "Radiant path is not ASCII: %s", g_strAppPath.c_str() ); + // radiant is installed in the parent dir of "tools/" // NOTE: this is not very easy for debugging // maybe add options to lookup in several places?