mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-11-03 14:58:18 +00:00
Fix CLI internal path filtering on Windows
Split logical Vault paths on '/' on every platform so that internal database files and hidden path segments remain excluded when the database and Vault share a directory. Cover POSIX and Windows host separators through the real CLI bootstrap filter, preserving the omitted-Vault-path E2E scenario.
This commit is contained in:
1 parent
2433d117c2
commit
5e3e7e1330
3 files changed
+39
-1
No files matched your search
@@ -550,7 +550,7 @@ export async function main(
|
||||
// Add target filter to prevent internal files are handled
|
||||
core.services.vault.isTargetFile.addHandler(async (target) => {
|
||||
const targetPath = stripAllPrefixes(getPathFromUXFileInfo(target));
|
||||
const parts = targetPath.split(path.sep);
|
||||
const parts = targetPath.split("/");
|
||||
// if some part of the path starts with dot, treat it as internal file and ignore.
|
||||
if (parts.some((part) => part.startsWith("."))) {
|
||||
return await Promise.resolve(false);
|
||||
|
||||
Reference in new issue
Block a user