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

Fixed setting an empty recording name or folder to a blank in the "Edit recording" menu

This commit is contained in:
Klaus Schmidinger 2015-02-07 15:53:30 +01:00
parent 8b57eacd1b
commit 5b88d0bfac
3 changed files with 12 additions and 4 deletions

View File

@ -2417,6 +2417,8 @@ Christoph Haubrich <christoph1.haubrich@arcor.de>
a recording
for suggesting to add a function to remove the name of a recording and replace it
with the last element of the recording's folder path name
for reporting a bug in setting an empty recording name or folder to a blank in the
"Edit recording" menu
Pekka Mauno <pekka.mauno@iki.fi>
for fixing cSchedule::GetFollowingEvent() in case there is currently no present

View File

@ -8453,7 +8453,7 @@ Video Disk Recorder Revision History
- Added support for LCN (Logical Channel Numbers), which plugins may use to sort
channels (thanks to Rolf Ahrenberg).
2015-02-06: Version 2.1.9
2015-02-07: Version 2.1.9
- Fixed a memory leak in case of broken Extended Event Descriptors (thanks to Lars
Hanisch).
@ -8511,3 +8511,5 @@ Video Disk Recorder Revision History
- cDvbPlayer and cReplayControl now use the same list of editing marks. This avoids
inconsistent behavior with the "Skip edited parts" or "Pause replay at last mark"
functions when the editing marks are manipulated during replay.
- Fixed setting an empty recording name or folder to a blank in the "Edit recording"
menu (reported by Christoph Haubrich).

10
menu.c
View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: menu.c 3.44 2015/02/07 14:14:50 kls Exp $
* $Id: menu.c 3.45 2015/02/07 15:42:37 kls Exp $
*/
#include "menu.h"
@ -2251,8 +2251,10 @@ eOSState cMenuPathEdit::Folder(void)
eOSState cMenuPathEdit::ApplyChanges(void)
{
if (!*name)
if (!*name) {
*name = ' '; // name must not be empty!
name[1] = 0;
}
cString NewPath = *folder ? cString::sprintf("%s%c%s", folder, FOLDERDELIMCHAR, name) : name;
NewPath.CompactChars(FOLDERDELIMCHAR);
if (strcmp(NewPath, path)) {
@ -2467,8 +2469,10 @@ eOSState cMenuRecordingEdit::ApplyChanges(void)
}
Modified = true;
}
if (!*name)
if (!*name) {
*name = ' '; // name must not be empty!
name[1] = 0;
}
cString NewName = *folder ? cString::sprintf("%s%c%s", folder, FOLDERDELIMCHAR, name) : name;
NewName.CompactChars(FOLDERDELIMCHAR);
if (strcmp(NewName, recording->Name())) {