Mercurial > audlegacy
changeset 1028:872e802cb1c0 trunk
[svn] - Use g_get_home_dir() instead of getenv ugliness here.
author | nenolod |
---|---|
date | Fri, 12 May 2006 06:29:11 -0700 |
parents | 314665261dbe |
children | 54dd4df67688 |
files | Plugins/General/scrobbler/scrobbler.c |
diffstat | 1 files changed, 2 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/Plugins/General/scrobbler/scrobbler.c Thu May 11 20:58:33 2006 -0700 +++ b/Plugins/General/scrobbler/scrobbler.c Fri May 12 06:29:11 2006 -0700 @@ -555,16 +555,13 @@ static void read_cache(void) { FILE *fd; - char *home, buf[PATH_MAX], *cache = NULL, *ptr1, *ptr2; + char buf[PATH_MAX], *cache = NULL, *ptr1, *ptr2; int cachesize, written, i = 0; item_t *item; cachesize = written = 0; - if(!(home = getenv("HOME"))) - return; - - snprintf(buf, sizeof(buf), "%s/.audacious/scrobblerqueue.txt", home); + snprintf(buf, sizeof(buf), "%s/.audacious/scrobblerqueue.txt", g_get_home_dir()); if (!(fd = fopen(buf, "r"))) return;