diff options
author | tomsmeding <tom.smeding@gmail.com> | 2017-04-08 11:51:33 +0200 |
---|---|---|
committer | tomsmeding <tom.smeding@gmail.com> | 2017-04-08 11:51:33 +0200 |
commit | c2e34e8976012a5f50f789fb1f78334a09ac1771 (patch) | |
tree | 32c34664cbdf0980b51bffb7638ef23211227ee4 /weechat | |
parent | 9b44e7bee2ac20e51c785dd36c152365dca9ac5b (diff) |
weechat: write debug log to $HOME/Desktop
Diffstat (limited to 'weechat')
-rw-r--r-- | weechat/tomsg.c | 5 |
1 files changed, 4 insertions, 1 deletions
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"); |