mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-18 05:25:40 +09:00
fix(schema): keep the extension when a filename has repeated dots (#1642)
This commit is contained in:
1 parent
5cd22ee84e
commit
3ed43ca00f
2 files changed
+10
-3
No files matched your search
@@ -59,7 +59,7 @@ export function normalizeFilename(value: string): string {
|
||||
let normalized = normalizeString(value);
|
||||
normalized = normalized.replaceAll(String.fromCharCode(0), '');
|
||||
normalized = normalized.replace(/[/\\]/g, '_');
|
||||
normalized = normalized.replace(/\.{2,}/g, '_');
|
||||
normalized = normalized.replace(/\.{2,}/g, '.');
|
||||
while (normalized.includes('..')) {
|
||||
normalized = normalized.replace(/\.\./g, '_');
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user