mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-07-12 15:53:12 +00:00
Explain portable storage path policy
This commit is contained in:
@@ -10,6 +10,8 @@ export function validateStoragePath(storagePath: string, allowRoot: boolean = tr
|
||||
throw new Error("The storage root is not a valid entry path");
|
||||
}
|
||||
|
||||
// LiveSync normally rejects ':' in portable filenames before paths reach storage. A leading letter and colon
|
||||
// therefore represents drive-qualified input or a leaked non-storage namespace, not a supported physical path.
|
||||
if (storagePath.startsWith("/") || storagePath.startsWith("\\") || /^[A-Za-z]:/.test(storagePath)) {
|
||||
throw new Error(`Storage paths must be relative to the configured root: ${storagePath}`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user