From 1f634f9e31d28c4fa726ea6e2c90dd428d9b1636 Mon Sep 17 00:00:00 2001 From: Martynas Bagdonas Date: Thu, 23 Sep 2021 13:53:47 +0300 Subject: [PATCH] Use OS.File.writeAtomic without tmpPath to avoid #2210 --- chrome/content/zotero/xpcom/reader.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/reader.js b/chrome/content/zotero/xpcom/reader.js index 07ffcb8e3b..396a6c65c5 100644 --- a/chrome/content/zotero/xpcom/reader.js +++ b/chrome/content/zotero/xpcom/reader.js @@ -252,7 +252,7 @@ class ReaderInstance { await Zotero.Attachments.createDirectoryForItem(item); } file.append(this.pdfStateFileName); - await Zotero.File.putContentsAsync(file, JSON.stringify(state)); + await OS.File.writeAtomic(file.path, JSON.stringify(state)); } }