[vlc-commits] text: fix filename_sanitize() comments

Rémi Denis-Courmont git at videolan.org
Sat Apr 30 18:13:45 CEST 2016


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Apr 30 18:50:43 2016 +0300| [7b0132ad2e382797d20318f0df84bc17c0d27fa4] | committer: Rémi Denis-Courmont

text: fix filename_sanitize() comments

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7b0132ad2e382797d20318f0df84bc17c0d27fa4
---

 src/text/strings.c |   15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/src/text/strings.c b/src/text/strings.c
index e1a3f80..2ebc240 100644
--- a/src/text/strings.c
+++ b/src/text/strings.c
@@ -832,12 +832,15 @@ char *str_format_meta(input_thread_t *input, const char *s)
 }
 
 /**
+ * Sanitize a file name.
+ *
  * Remove forbidden, potentially forbidden and otherwise evil characters from
- * filenames. This includes slashes, and popular characters like colon
- * (on Unix anyway), so this should only be used for automatically generated
- * filenames.
- * \warning Do not use this on full paths,
- * only single file names without any directory separator!
+ * file names. That includes slashes, and popular characters like colon
+ * (on Unix anyway).
+ *
+ * \warning This function should only be used for automatically generated
+ * file names. Do not use this on full paths, only single file names without
+ * any directory separator!
  */
 void filename_sanitize( char *str )
 {
@@ -851,7 +854,7 @@ void filename_sanitize( char *str )
         return;
     }
 
-    /* On platforms not using UTF-7, VLC cannot access non-Unicode paths.
+    /* On platforms not using UTF-8, VLC cannot access non-Unicode paths.
      * Also, some file systems require Unicode file names.
      * NOTE: This may inserts '?' thus is done replacing '?' with '_'. */
     EnsureUTF8( str );



More information about the vlc-commits mailing list