mirror of
https://github.com/moparisthebest/hexchat
synced 2024-11-23 01:32:22 -05:00
disable logging when not in portable mode
This commit is contained in:
parent
5472a813fa
commit
440e3bc279
@ -288,10 +288,15 @@ static void populate_with_themes(GtkWidget* w)
|
|||||||
static void redirect_to_file (const gchar* log_domain, GLogLevelFlags log_level,
|
static void redirect_to_file (const gchar* log_domain, GLogLevelFlags log_level,
|
||||||
const gchar* message, gpointer user_data)
|
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;
|
std::fstream f;
|
||||||
f.open("g_stdout.txt", std::ios::app);
|
f.open("gtk2-prefs.log", std::ios::app);
|
||||||
f << message << "\n";
|
f << message << "\n";
|
||||||
f.close();
|
f.close();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user