X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fdebug.c;h=5a976d0c1910b3c5c634eee336d20d57e7758789;hb=5563e251c36a1fbda703cf4bc3c8c6ae543829bd;hp=b44163263f9a98a3e551bff1d49ca27e85c8777c;hpb=a21840cbb7912c25abc1943c08d6980da7537a6c;p=chaz%2Fopenbox diff --git a/openbox/debug.c b/openbox/debug.c index b4416326..5a976d0c 100644 --- a/openbox/debug.c +++ b/openbox/debug.c @@ -48,6 +48,8 @@ void ob_debug_startup(void) else { gchar *name = g_build_filename(obt_paths_cache_home(p), "openbox", "openbox.log", NULL); + /* unlink it before opening to remove competition */ + unlink(name); log_file = fopen(name, "w"); g_free(name); } @@ -62,6 +64,7 @@ void ob_debug_startup(void) g_log_set_handler("Openbox", G_LOG_LEVEL_MASK | G_LOG_FLAG_FATAL | G_LOG_FLAG_RECURSION, log_handler, NULL); + obt_paths_unref(p); g_free(dir); }