Use OS.File.writeAtomic without tmpPath to avoid #2210

This commit is contained in:
Martynas Bagdonas 2021-09-23 13:53:47 +03:00
parent 47d4949b2a
commit 1f634f9e31

View file

@ -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));
}
}