mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
Fixed a problem with recordings that have a single quote character in their name (this is now mapped to 0x01)
This commit is contained in:
parent
a7404879aa
commit
35343eaf47
2
HISTORY
2
HISTORY
@ -335,3 +335,5 @@ Video Disk Recorder Revision History
|
|||||||
- Fixed starting a replay session when the program is currently in "transfer
|
- Fixed starting a replay session when the program is currently in "transfer
|
||||||
mode".
|
mode".
|
||||||
- Fixed setting/modifying timers via SVDRP with empty summary fields.
|
- Fixed setting/modifying timers via SVDRP with empty summary fields.
|
||||||
|
- Fixed a problem with recordings that have a single quote character in their
|
||||||
|
name (this is now mapped to 0x01).
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: recording.c 1.23 2001/01/01 14:48:03 kls Exp $
|
* $Id: recording.c 1.24 2001/01/13 12:17:15 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define _GNU_SOURCE
|
#define _GNU_SOURCE
|
||||||
@ -126,6 +126,7 @@ cRecording::cRecording(const char *FileName)
|
|||||||
strncpy(name, FileName, p - FileName);
|
strncpy(name, FileName, p - FileName);
|
||||||
name[p - FileName] = 0;
|
name[p - FileName] = 0;
|
||||||
strreplace(name, '_', ' ');
|
strreplace(name, '_', ' ');
|
||||||
|
strreplace(name, '\x01', '\'');
|
||||||
}
|
}
|
||||||
// read an optional summary file:
|
// read an optional summary file:
|
||||||
char *SummaryFileName = NULL;
|
char *SummaryFileName = NULL;
|
||||||
@ -176,8 +177,10 @@ const char *cRecording::FileName(void)
|
|||||||
if (!fileName) {
|
if (!fileName) {
|
||||||
struct tm *t = localtime(&start);
|
struct tm *t = localtime(&start);
|
||||||
asprintf(&fileName, NAMEFORMAT, VideoDirectory, name, t->tm_year + 1900, t->tm_mon + 1, t->tm_mday, t->tm_hour, t->tm_min, priority, lifetime);
|
asprintf(&fileName, NAMEFORMAT, VideoDirectory, name, t->tm_year + 1900, t->tm_mon + 1, t->tm_mday, t->tm_hour, t->tm_min, priority, lifetime);
|
||||||
if (fileName)
|
if (fileName) {
|
||||||
strreplace(fileName, ' ', '_');
|
strreplace(fileName, ' ', '_');
|
||||||
|
strreplace(fileName, '\'', '\x01');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return fileName;
|
return fileName;
|
||||||
}
|
}
|
||||||
|
4
tools.c
4
tools.c
@ -4,7 +4,7 @@
|
|||||||
* See the main source file 'vdr.c' for copyright information and
|
* See the main source file 'vdr.c' for copyright information and
|
||||||
* how to reach the author.
|
* how to reach the author.
|
||||||
*
|
*
|
||||||
* $Id: tools.c 1.25 2000/12/24 12:38:22 kls Exp $
|
* $Id: tools.c 1.26 2001/01/13 12:17:30 kls Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define _GNU_SOURCE
|
#define _GNU_SOURCE
|
||||||
@ -120,7 +120,7 @@ const char *AddDirectory(const char *DirName, const char *FileName)
|
|||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define DFCMD "df -m %s"
|
#define DFCMD "df -m '%s'"
|
||||||
|
|
||||||
uint FreeDiskSpaceMB(const char *Directory)
|
uint FreeDiskSpaceMB(const char *Directory)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user