diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2001-08-11 14:51:28 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2001-08-11 14:51:28 +0200 |
commit | 2069b9946ea0c561d5c65bfc19baa202edeeaa91 (patch) | |
tree | 4c1d46c74f6694d3dc17cbb9d7fbc2025eb01ed7 /tools.c | |
parent | 8e7c06006f8667148f6564326be2deafa5a3a3e8 (diff) | |
download | vdr-2069b9946ea0c561d5c65bfc19baa202edeeaa91.tar.gz vdr-2069b9946ea0c561d5c65bfc19baa202edeeaa91.tar.bz2 |
Fixed AddDirectory
Diffstat (limited to 'tools.c')
-rw-r--r-- | tools.c | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: tools.c 1.37 2001/08/11 11:14:19 kls Exp $ + * $Id: tools.c 1.38 2001/08/11 14:49:48 kls Exp $ */ #define _GNU_SOURCE @@ -117,10 +117,7 @@ const char *AddDirectory(const char *DirName, const char *FileName) { static char *buf = NULL; delete buf; - if (*FileName != '/') - asprintf(&buf, "%s/%s", DirName && *DirName ? DirName : ".", FileName); - else - buf = strdup(FileName); + asprintf(&buf, "%s/%s", DirName && *DirName ? DirName : ".", FileName); return buf; } |