Skip to content

Commit f0ba511

Browse files
committed
fix(Scanner): Make sure to create mappings for moved bookmarks
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
1 parent 817be1c commit f0ba511

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/lib/Scanner.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,9 @@ export default class Scanner<L1 extends TItemLocation, L2 extends TItemLocation>
263263
reconciled = true
264264
if (oldItem.type === ItemType.FOLDER) {
265265
await this.diffItem(oldItem, createdItem)
266+
} else if (this.createMappings) {
267+
// Usually we let diffItem handle mapping creation but here we need to do it ourselves
268+
await this.addMapping(oldItem, createdItem)
266269
}
267270
} else {
268271
const newItem = createdItem.findItemFilter(
@@ -295,6 +298,9 @@ export default class Scanner<L1 extends TItemLocation, L2 extends TItemLocation>
295298
reconciled = true
296299
if (removedItem.type === ItemType.FOLDER) {
297300
await this.diffItem(removedItem, newItem)
301+
} else if (this.createMappings) {
302+
// Usually we let diffItem handle mapping creation but here we need to do it ourselves
303+
await this.addMapping(removedItem, newItem)
298304
}
299305
}
300306
}

0 commit comments

Comments
 (0)