aboutsummaryrefslogtreecommitdiff
path: root/weechat
diff options
context:
space:
mode:
authortomsmeding <tom.smeding@gmail.com>2017-04-08 11:51:33 +0200
committertomsmeding <tom.smeding@gmail.com>2017-04-08 11:51:33 +0200
commitc2e34e8976012a5f50f789fb1f78334a09ac1771 (patch)
tree32c34664cbdf0980b51bffb7638ef23211227ee4 /weechat
parent9b44e7bee2ac20e51c785dd36c152365dca9ac5b (diff)
weechat: write debug log to $HOME/Desktop
Diffstat (limited to 'weechat')
-rw-r--r--weechat/tomsg.c5
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");