summaryrefslogtreecommitdiff
path: root/tools.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2017-06-23 09:44:25 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2017-06-23 09:44:25 +0200
commit9cf7328452d0467769a8640bea552cbe2344bf84 (patch)
treeb35c76254e94dbcf6c57190035f0a5ac5b4f4070 /tools.c
parent0bccf29254cd0f798369f1728f7280048978be23 (diff)
downloadvdr-9cf7328452d0467769a8640bea552cbe2344bf84.tar.gz
vdr-9cf7328452d0467769a8640bea552cbe2344bf84.tar.bz2
Now skipping a leading '/' in AddDirectory(), to avoid double slashes
Diffstat (limited to 'tools.c')
-rw-r--r--tools.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools.c b/tools.c
index a8e6af1e..042e56c7 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 4.6 2017/05/09 08:32:54 kls Exp $
+ * $Id: tools.c 4.7 2017/06/23 09:39:45 kls Exp $
*/
#include "tools.h"
@@ -371,6 +371,8 @@ bool StrInArray(const char *a[], const char *s)
cString AddDirectory(const char *DirName, const char *FileName)
{
+ if (*FileName == '/')
+ FileName++;
return cString::sprintf("%s/%s", DirName && *DirName ? DirName : ".", FileName);
}