mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2025-12-21 13:41:29 +00:00
Fixes:
- Allow "'" and ban "#" in filenames. #27 - Fixed misspelling (one of #28)
This commit is contained in:
@@ -72,7 +72,7 @@ export function resolveWithIgnoreKnownError<T>(p: Promise<T>, def: T): Promise<T
|
||||
|
||||
export function isValidPath(filename: string): boolean {
|
||||
// eslint-disable-next-line no-control-regex
|
||||
const regex = /[\u0000-\u001f]|[\\"':?<>|*]/g;
|
||||
const regex = /[\u0000-\u001f]|[\\":?<>|*#]/g;
|
||||
let x = filename.replace(regex, "_");
|
||||
const win = /(\\|\/)(COM\d|LPT\d|CON|PRN|AUX|NUL|CLOCK$)($|\.)/gi;
|
||||
const sx = (x = x.replace(win, "/_"));
|
||||
|
||||
Reference in New Issue
Block a user