--- rxvt-unicode/src/rxvtdaemon.C 2007/12/14 02:22:24 1.14 +++ rxvt-unicode/src/rxvtdaemon.C 2012/01/23 14:29:24 1.20 @@ -3,7 +3,7 @@ *----------------------------------------------------------------------* * * All portions of code are copyright by their respective author/s. - * Copyright (c) 2003-2007 Marc Lehmann + * Copyright (c) 2003-2007 Marc Lehmann * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -20,16 +20,16 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *----------------------------------------------------------------------*/ -#include -#include -#include +#include +#include +#include #include #include #include +#include #include #include -#include #include "rxvtdaemon.h" @@ -44,8 +44,14 @@ uname (&u); path = getenv ("HOME"); - snprintf (name, PATH_MAX, "%s/.rxvt-unicode-%s", - path ? path : "/tmp", + if (!path) + path = "/tmp"; + + snprintf (name, PATH_MAX, "%s/.urxvt", path); + mkdir (name, 0777); + + snprintf (name, PATH_MAX, "%s/.urxvt/urxvtd-%s", + path, u.nodename); path = name; @@ -87,7 +93,7 @@ if (len) *len = l; - data = new char[l + 1]; + data = (char *)malloc (l + 1); if (!data) return false;