<dd>If checked, whitespace characters (spaces and tabs) will be replaced with '-'.
<dt>Use Windows-compatible filenames
- <dd>If checked, special characters not supported by Windows like: <i>/ : \ < > | * ? ' "</i> will be replaced with '_'.
+ <dd>If checked:<br>
+ * special characters not supported by Windows like: <i>/ : \ < > | * ? ' "</i> will be replaced with '_'<br>
+ * trailing spaces ' ' and dots '.' will be removed
</dl>
Changes to any of these settings must be confirmed by pressing the 'Save configuration' button before taking effect.
if (s[0] == '.')
s[0] = '_';
- for (i = 0, len = strlen(s); i < len; i++) {
+ int len2 = strlen(s);
+ for (i = 0; i < len2; i++) {
if(s[i] == '/')
s[i] = '-';
s[i] = '_';
}
+ if(cfg->dvr_windows_compatible_filenames) {
+ //trim trailing spaces and dots
+ for (i = len2 - 1; i >= 0; i--) {
+ if((s[i] == ' ') || (s[i] == '.')) {
+ s[i] = '\0';
+ }
+ else {
+ break;
+ }
+ }
+ }
+
return s;
}