- Allow "'" and ban "#" in filenames. #27
- Fixed misspelling (one of #28)
This commit is contained in:
vorotamoroz
2021-12-22 19:38:00 +09:00
parent fc210de58b
commit abe613539b
5 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -1084,7 +1084,7 @@ export class ObsidianLiveSyncSettingTab extends PluginSettingTab {
xx.addClass("mod-warning");
}
} else {
containerCorruptedDataEl.createEl("div", { text: "There's no collupted data." });
containerCorruptedDataEl.createEl("div", { text: "There is no corrupted data." });
}
applyDisplayEnabled();
addScreenElement("70", containerCorruptedDataEl);
+1 -1
View File
@@ -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, "/_"));