fix(continuity): ignore AppleDouble lease sidecars

This commit is contained in:
冰朔 2026-08-05 21:08:28 +08:00
commit f48ca13295
3 changed files with 15 additions and 4 deletions

View file

@ -133,6 +133,10 @@ export function safeCacheRelative(worktree, candidate) {
return { absolute, relative };
}
export function isJsonRecordName(name) {
return String(name).endsWith(".json") && !String(name).startsWith("._");
}
function run(file, args, options = {}) {
return execFileSync(file, args, {
cwd: options.cwd,
@ -164,7 +168,7 @@ function listOwnedLeases(storeRoot, developmentId) {
if (!fs.existsSync(directory)) return [];
return fs
.readdirSync(directory)
.filter((name) => name.endsWith(".json"))
.filter(isJsonRecordName)
.map((name) => readJson(path.join(directory, name)))
.filter((lease) => lease.development_id === developmentId);
}