Fixed handling '/' and '~' in recording file names in case DirectoryEncoding is used

This commit is contained in:
Klaus Schmidinger 2013-04-11 08:17:17 +02:00
parent 0e4b404102
commit c979ef393b
3 changed files with 8 additions and 2 deletions

View File

@ -2833,6 +2833,8 @@ Lars Hanisch <dvb@flensrocker.de>
for fixing a typo in skins.h
for fixing some #include statements in plugins to use <vdr/...> instead of "vdr/..."
for reporting an invalid line in channels.conf.terr
for fixing handling '/' and '~' in recording file names in case DirectoryEncoding is
used
Alex Lasnier <alex@fepg.org>
for adding tuning support for ATSC devices

View File

@ -7791,7 +7791,7 @@ Video Disk Recorder Revision History
- Added definitions for older DVB API versions, back until 5.0 (based on a patch from
Udo Richter).
2013-04-10: Version 2.1.1
2013-04-11: Version 2.1.1
- Fixed initializing cDevice::keepTracks.
- Fixed an endless loop in cTextWrapper::Set() in case the given Width is smaller than
@ -7802,3 +7802,5 @@ Video Disk Recorder Revision History
- Changed cThread::SetIOPriority() from "best effort class" to "idle class" in order to
improve overall performance when an editing process is running (thanks to Jochen
Dolze).
- Fixed handling '/' and '~' in recording file names in case DirectoryEncoding is
used (thanks to Lars Hanisch).

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: recording.c 2.91 2013/03/11 10:34:41 kls Exp $
* $Id: recording.c 3.1 2013/04/11 08:14:01 kls Exp $
*/
#include "recording.h"
@ -561,6 +561,7 @@ char *ExchangeChars(char *s, bool ToFileSystem)
// characters that can be mapped to other characters:
case ' ': *p = '_'; break;
case FOLDERDELIMCHAR: *p = '/'; break;
case '/': *p = FOLDERDELIMCHAR; break;
// characters that have to be encoded:
default:
if (NeedsConversion(p)) {
@ -583,6 +584,7 @@ char *ExchangeChars(char *s, bool ToFileSystem)
switch (*p) {
// mapped characters:
case '_': *p = ' '; break;
case FOLDERDELIMCHAR: *p = '/'; break;
case '/': *p = FOLDERDELIMCHAR; break;
// encoded characters:
case '#': {