From da0fb17015db4ad56da060b1ceff81420fddf18d Mon Sep 17 00:00:00 2001 From: Liam Townsend Date: Mon, 13 Aug 2018 15:25:06 +0100 Subject: [PATCH] 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"} --- src/episode.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/episode.ts b/src/episode.ts index d13817d..6774701 100644 --- a/src/episode.ts +++ b/src/episode.ts @@ -66,7 +66,7 @@ function fileExist(path: string) function sanitiseFileName(str: string) { - return str.replace(/[\/':\?\*"<>\\\.]/g, '_'); + return str.replace(/[\/':\?\*"<>\\\.\|]/g, '_'); } /**