Skip to content

Commit 52016f8

Browse files
committed
fix(Git|GDrive|WebDAV): Use copy in onSyncComplete hook
instead of clone Signed-off-by: Marcel Klehr <mklehr@gmx.net>
1 parent d5db3bf commit 52016f8

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/lib/adapters/Git.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ export default class GitAdapter extends CachingAdapter {
184184
Logger.log('onSyncComplete')
185185
clearInterval(this.lockingInterval)
186186

187-
this.bookmarksCache = this.bookmarksCache.clone()
187+
this.bookmarksCache = this.bookmarksCache.copy(false)
188188
const newTreeHash = await this.bookmarksCache.hash(true)
189189
if (newTreeHash !== this.initialTreeHash) {
190190
const fileContents = this.server.bookmark_file_type === 'xbel' ? createXBEL(this.bookmarksCache, this.highestId) : createHTML(this.bookmarksCache, this.highestId)

src/lib/adapters/GoogleDrive.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ export default class GoogleDriveAdapter extends CachingAdapter {
321321
Logger.log('onSyncComplete')
322322
clearInterval(this.lockingInterval)
323323

324-
this.bookmarksCache = this.bookmarksCache.clone()
324+
this.bookmarksCache = this.bookmarksCache.copy(false)
325325
const newTreeHash = await this.bookmarksCache.hash(true)
326326
let xbel = createXBEL(this.bookmarksCache, this.highestId)
327327

src/lib/adapters/WebDav.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ export default class WebDavAdapter extends CachingAdapter {
352352
this.ended = true
353353
clearInterval(this.lockingInterval)
354354

355-
this.bookmarksCache = this.bookmarksCache.clone()
355+
this.bookmarksCache = this.bookmarksCache.copy(false)
356356
const newTreeHash = await this.bookmarksCache.hash(true)
357357
if (newTreeHash !== this.initialTreeHash) {
358358
const fullUrl = this.getBookmarkURL()

0 commit comments

Comments
 (0)