Trying to clean file name in a better way.
This commit is contained in:
parent
8b9f9a5e1c
commit
b2ecd05586
@ -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, '/');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user