]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
DVR: format strings - replace " with ' to pass proper arguments
authorJaroslav Kysela <perex@perex.cz>
Fri, 19 Feb 2016 17:09:37 +0000 (18:09 +0100)
committerJaroslav Kysela <perex@perex.cz>
Fri, 19 Feb 2016 17:09:37 +0000 (18:09 +0100)
src/dvr/dvr_rec.c

index 86dfc149ff8a8531882ae9db1f604364d08b36c0..496190421dcef55a14ceee541f41b7b16138359e 100644 (file)
@@ -267,13 +267,20 @@ dvr_clean_directory_separator(char *s, char *tmp, size_t tmplen)
     end = tmp + tmplen - 1;
     /* replace directory separator */
     for (p = tmp; *s && p != end; s++, p++)
-      *p = *s == '/' ? '-' : *s;
+      if (*s == '/')
+        *p = '-';
+      else if (*s == '"')
+        *s = '\'';
+      else
+        *p = *s;
     *p = '\0';
     return tmp;
   } else  {
     for (; *s; s++)
       if (*s == '/')
         *s = '-';
+      else if (*s == '"')
+        *s = '\'';
     return tmp;
   }
 }