From c2e34e8976012a5f50f789fb1f78334a09ac1771 Mon Sep 17 00:00:00 2001 From: tomsmeding Date: Sat, 8 Apr 2017 11:51:33 +0200 Subject: weechat: write debug log to $HOME/Desktop --- weechat/tomsg.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'weechat') diff --git a/weechat/tomsg.c b/weechat/tomsg.c index 25e62e5..9d6f65c 100644 --- a/weechat/tomsg.c +++ b/weechat/tomsg.c @@ -350,7 +350,10 @@ int weechat_plugin_init(struct t_weechat_plugin *plugin,int argc,char **argv){ (void)argc; (void)argv; weechat_plugin=plugin; - debugf=fopen("/Users/Tom/Desktop/debugf.txt","w"); + char *fname; + asprintf(&fname,"%s/Desktop/debugf.txt",getenv("HOME")); + debugf=fopen(fname,"w"); + free(fname); setvbuf(debugf,NULL,_IONBF,0); fprintf(debugf,"------\n"); -- cgit v1.2.3-70-g09d2