Explain portable storage path policy

This commit is contained in:
vorotamoroz
2026-07-12 10:40:16 +00:00
parent d16e66c67a
commit 4df87cc96a
+2
View File
@@ -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}`);
}