Trying to clean file name in a better way.

This commit is contained in:
Godzil 2020-04-13 20:13:23 +01:00
parent 8b9f9a5e1c
commit b2ecd05586

View File

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