summaryrefslogtreecommitdiff
path: root/recording.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2002-01-26 12:04:32 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2002-01-26 12:04:32 +0100
commit503c803b8d97e7997bc2a5c42eb6a2014d013528 (patch)
treec58f7f220f0d54e87dbf028a74e6cf1975ad95b4 /recording.c
parentfe7b03d6b5ecc1e3fbb2804fe179669f8f111c7a (diff)
downloadvdr-503c803b8d97e7997bc2a5c42eb6a2014d013528.tar.gz
vdr-503c803b8d97e7997bc2a5c42eb6a2014d013528.tar.bz2
Fixed handling file names that contain single quotes or dollar signs in calls to external commands
Diffstat (limited to 'recording.c')
-rw-r--r--recording.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/recording.c b/recording.c
index faabd4ca..6426f330 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.44 2002/01/20 16:47:09 kls Exp $
+ * $Id: recording.c 1.45 2002/01/26 11:57:56 kls Exp $
*/
#include "recording.h"
@@ -640,7 +640,7 @@ void cRecordingUserCommand::InvokeCommand(const char *State, const char *Recordi
{
if (command) {
char *cmd;
- asprintf(&cmd, "%s %s '%s'", command, State, RecordingFileName);
+ asprintf(&cmd, "%s %s \"%s\"", command, State, strescape(RecordingFileName, "\"$"));
isyslog(LOG_INFO, "executing '%s'", cmd);
SystemExec(cmd);
delete cmd;