Strip LRM and RLM in Linux names (fix #1361, PR #1365)

On Linux (SUSE at least), if `--name` isn't provided and is inferred,
the filename is prepended with the control character
LRM (https://en.wikipedia.org/wiki/Left-to-right_mark) and I'd assume
RLM for anyone who's using that setting.

This PR strips those control characters out of the file name.
This commit is contained in:
Tedward747 2022-03-20 21:27:57 -06:00 committed by GitHub
parent 2f97a7156b
commit 83dce91c47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -11,7 +11,7 @@ export function sanitizeFilename(
// spaces will cause problems with Ubuntu when pinned to the dock
if (platform === 'linux') {
result = result.replace(/\s/g, '');
result = result.replace(/[\s\u200e\u200f]/g, '');
}
if (!result || result === '') {