fix: replacing filename bug on creating

This commit is contained in:
monoid 2025-01-08 23:33:43 +09:00
parent 76b292760f
commit 6e233991b4

View File

@ -89,9 +89,12 @@ export class ContentDiffHandler {
console.log("create",cpath, hash) console.log("create",cpath, hash)
const c = this.tombstone.get(hash); const c = this.tombstone.get(hash);
if (c !== undefined) { if (c !== undefined) {
console.log("revive document", c.id)
const content_body = await content.createDocumentBody();
await this.doc_cntr.update({ await this.doc_cntr.update({
id: c.id, id: c.id,
...content.createDocumentBody(), ...content_body,
deleted_at: null,
}); });
} }
if (this.waiting_list.hasByHash(hash)) { if (this.waiting_list.hasByHash(hash)) {