summaryrefslogtreecommitdiff
path: root/tools.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2001-08-11 09:38:12 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2001-08-11 09:38:12 +0200
commit627916d32a363913f34b255b0a5dc0e89ffe9408 (patch)
tree48d643ba72e2238faa3493a79434891d111ef6c3 /tools.c
parentcf15f276f9b7b97311003d2d1dc6dcdb444feb37 (diff)
downloadvdr-627916d32a363913f34b255b0a5dc0e89ffe9408.tar.gz
vdr-627916d32a363913f34b255b0a5dc0e89ffe9408.tar.bz2
New command line option -E
Diffstat (limited to 'tools.c')
-rw-r--r--tools.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/tools.c b/tools.c
index c75efbb9..6b08d65d 100644
--- a/tools.c
+++ b/tools.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: tools.c 1.35 2001/08/05 12:38:06 kls Exp $
+ * $Id: tools.c 1.36 2001/08/11 08:52:27 kls Exp $
*/
#define _GNU_SOURCE
@@ -116,7 +116,10 @@ const char *AddDirectory(const char *DirName, const char *FileName)
{
static char *buf = NULL;
delete buf;
- asprintf(&buf, "%s/%s", DirName && *DirName ? DirName : ".", FileName);
+ if (*FileName != '/')
+ asprintf(&buf, "%s/%s", DirName && *DirName ? DirName : ".", FileName);
+ else
+ buf = strdup(FileName);
return buf;
}