Browse Source

Filtering out Pipe Symbol in file names

updated sanitiseFileName to include the pipe symbol as this character is not allowed on windows, the error thast it currently throws is: {"errno":-4058,"code":"ENOENT","syscall":"open","path":"K:\\MediaDwn\\Is It Wrong to Try to Pick Up Girls in a Dungeon_\\Is It Wrong to Try to Pick Up Girls in a Dungeon_ - s01e01 - Bell Cranel | Adventurer - [CrunchyRoll].ass"}
Liam Townsend 5 years ago
parent
commit
da0fb17015
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/episode.ts

+ 1 - 1
src/episode.ts

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