Browse Source

Trying to clean file name in a better way.

Godzil 4 years ago
parent
commit
b2ecd05586
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/episode.ts

+ 3 - 1
src/episode.ts

@@ -66,7 +66,9 @@ function fileExist(path: string)
 
 function sanitiseFileName(str: string)
 {
-  return str.replace(/[\/':\?\*"<>\\\.\|]/g, '_');
+  const sanitized = str.replace(/[\/':\?\*"<>\\\.\|]/g, '_');
+
+  return sanitized.replace(/{DIR_SEPARATOR}/g, '/');
 }
 
 /**