disable logging when not in portable mode
This commit is contained in:
parent
5472a813fa
commit
440e3bc279
@ -287,12 +287,17 @@ static void populate_with_themes(GtkWidget* w)
|
||||
#ifdef _WIN32
|
||||
static void redirect_to_file (const gchar* log_domain, GLogLevelFlags log_level,
|
||||
const gchar* message, gpointer user_data)
|
||||
{
|
||||
/* only write logs if running in portable mode, otherwise
|
||||
we would get a permission error in program files */
|
||||
if ((_access( "portable-mode", 0 )) != -1)
|
||||
{
|
||||
std::fstream f;
|
||||
f.open("g_stdout.txt", std::ios::app);
|
||||
f.open("gtk2-prefs.log", std::ios::app);
|
||||
f << message << "\n";
|
||||
f.close();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// ------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user