summaryrefslogtreecommitdiff
path: root/recording.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2005-05-16 15:19:54 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2005-05-16 15:19:54 +0200
commited52b359bba3399e6de59c8da2d653cfa76ef00f (patch)
tree7763459b28e18c4afc62fa8a046aaca5d41d1a10 /recording.c
parentb0583e5373e10119fd88d935cdded1e153101e22 (diff)
downloadvdr-ed52b359bba3399e6de59c8da2d653cfa76ef00f.tar.gz
vdr-ed52b359bba3399e6de59c8da2d653cfa76ef00f.tar.bz2
Avoiding extra blanks at the end of names of instant recordings
Diffstat (limited to 'recording.c')
-rw-r--r--recording.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/recording.c b/recording.c
index d20e9cbf..199d6827 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.99 2005/05/16 14:19:38 kls Exp $
+ * $Id: recording.c 1.100 2005/05/16 15:17:22 kls Exp $
*/
#include "recording.h"
@@ -386,6 +386,14 @@ cRecording::cRecording(cTimer *Timer, const cEvent *Event)
name = strdup(Timer->File());
name = strreplace(name, TIMERMACRO_TITLE, Title);
name = strreplace(name, TIMERMACRO_EPISODE, Subtitle);
+ // avoid blanks at the end:
+ int l = strlen(name);
+ while (l-- > 2) {
+ if (name[l] == ' ' && name[l - 1] != '~')
+ name[l] = 0;
+ else
+ break;
+ }
if (Timer->IsSingleEvent()) {
Timer->SetFile(name); // this was an instant recording, so let's set the actual data
Timers.SetModified();