From 2e3030a963efe5f98062f25af03e87b79b25ea38 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sun, 21 Apr 2002 14:10:31 +0200 Subject: Now encoding '.' at the end of a directory name in case of VFAT=1 --- CONTRIBUTORS | 4 ++++ HISTORY | 2 ++ recording.c | 6 +++--- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 3beb408b..874d98ee 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -305,3 +305,7 @@ Steffen Koch Matthias Hilbig for fixing some missing ',' in i18n.c + +Simon Dean + for reporting a problem with '.' at the end of a directory name in case of VFAT=1 + (Windows can't handle these) diff --git a/HISTORY b/HISTORY index 0fb22049..b8344856 100644 --- a/HISTORY +++ b/HISTORY @@ -1216,3 +1216,5 @@ Video Disk Recorder Revision History Schächner). - No longer setting PIDs 0x1FFF, which apparently fixes problems with CAMs and AC3 sound only working the first time (thanks to Stefan Huelswitt). +- Now encoding '.' at the end of a directory name in case of VFAT=1, since Windows + can't handle these (thanks to Simon Dean for reporting this one). diff --git a/recording.c b/recording.c index b19e8b73..e6370453 100644 --- a/recording.c +++ b/recording.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: recording.c 1.60 2002/04/01 10:51:23 kls Exp $ + * $Id: recording.c 1.61 2002/04/21 14:02:55 kls Exp $ */ #include "recording.h" @@ -222,7 +222,6 @@ static char *ExchangeChars(char *s, bool ToFileSystem) case '+': case ',': case '-': - case '.': case ';': case '=': case '0' ... '9': @@ -237,7 +236,8 @@ static char *ExchangeChars(char *s, bool ToFileSystem) case ' ': *p = '_'; break; case '~': *p = '/'; break; // characters that have to be encoded: - default: { + default: + if (*p != '.' || !*(p + 1) || *(p + 1) == '~') { // Windows can't handle '.' at the end of directory names int l = p - s; s = (char *)realloc(s, strlen(s) + 10); p = s + l; -- cgit v1.2.3