summaryrefslogtreecommitdiff
path: root/recording.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2000-11-01 16:04:57 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2000-11-01 16:04:57 +0100
commitef7f4ea17696ae65a25a6bc30f9d78c23a1d59b8 (patch)
tree1963bb52dfe3cc5028d1bf9967c84f25ea1d5d4f /recording.c
parent9d27e3436380dd16a09a27d547e062ad7f7867f1 (diff)
downloadvdr-ef7f4ea17696ae65a25a6bc30f9d78c23a1d59b8.tar.gz
vdr-ef7f4ea17696ae65a25a6bc30f9d78c23a1d59b8.tar.bz2
Replacing problematic characters in recording names0.6.7
Diffstat (limited to 'recording.c')
-rw-r--r--recording.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/recording.c b/recording.c
index f9ab0162..3ddf8d35 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.19 2000/10/08 12:20:53 kls Exp $
+ * $Id: recording.c 1.20 2000/11/01 16:00:36 kls Exp $
*/
#define _GNU_SOURCE
@@ -86,6 +86,13 @@ cRecording::cRecording(cTimer *Timer)
titleBuffer = NULL;
fileName = NULL;
name = strdup(Timer->file);
+ // substitute characters that would cause problems in file names:
+ for (char *p = name; *p; p++) {
+ switch (*p) {
+ case '\n': *p = ' '; break;
+ case '/': *p = '-'; break;
+ }
+ }
summary = Timer->summary ? strdup(Timer->summary) : NULL;
if (summary)
strreplace(summary, '|', '\n');