1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Now skipping a leading '/' in AddDirectory(), to avoid double slashes

This commit is contained in:
Klaus Schmidinger 2017-06-23 09:44:25 +02:00
parent 0bccf29254
commit 9cf7328452
3 changed files with 6 additions and 1 deletions

View File

@ -3103,6 +3103,7 @@ Chris Mayo <aklhfex@gmail.com>
for reporting a problem with detecting frames on radio channels for reporting a problem with detecting frames on radio channels
for fixing the link to "svdrpsend (1)" in the vdr.1 man page for fixing the link to "svdrpsend (1)" in the vdr.1 man page
for updating links in the INSTALL file for updating links in the INSTALL file
for reporting double slashes in file names processed with AddDirectory()
Dominic Evans <oldmanuk@gmail.com> Dominic Evans <oldmanuk@gmail.com>
for making the SVDRP command LSTC accepts channel IDs for making the SVDRP command LSTC accepts channel IDs

View File

@ -9140,3 +9140,5 @@ Video Disk Recorder Revision History
functions are called. functions are called.
- Fixed a possible crash in cStateLockLog. - Fixed a possible crash in cStateLockLog.
- Updated the Italian OSD texts (thanks to Diego Pierotto). - Updated the Italian OSD texts (thanks to Diego Pierotto).
- Now skipping a leading '/' in AddDirectory(), to avoid double slashes (reported by
Chris Mayo).

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * 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" #include "tools.h"
@ -371,6 +371,8 @@ bool StrInArray(const char *a[], const char *s)
cString AddDirectory(const char *DirName, const char *FileName) cString AddDirectory(const char *DirName, const char *FileName)
{ {
if (*FileName == '/')
FileName++;
return cString::sprintf("%s/%s", DirName && *DirName ? DirName : ".", FileName); return cString::sprintf("%s/%s", DirName && *DirName ? DirName : ".", FileName);
} }