mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-05-30 19:12:56 +00:00
Fixes:
- Allow "'" and ban "#" in filenames. #27 - Fixed misspelling (one of #28)
This commit is contained in:
@@ -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
@@ -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