From 6941f96a5a912e980d332db1bcb9c355c5a4720b Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Sat, 2 Dec 2017 04:11:35 -0500 Subject: [PATCH] Clear Windows read-only attribute when storing file --- chrome/content/zotero/xpcom/attachments.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/chrome/content/zotero/xpcom/attachments.js b/chrome/content/zotero/xpcom/attachments.js index 9889b72a00..e79fc79688 100644 --- a/chrome/content/zotero/xpcom/attachments.js +++ b/chrome/content/zotero/xpcom/attachments.js @@ -95,6 +95,8 @@ Zotero.Attachments = new function(){ // Copy file to unique filename, which automatically shortens long filenames newFile = Zotero.File.copyToUnique(file, newFile); + yield Zotero.File.setNormalFilePermissions(newFile.path); + if (!contentType) { contentType = yield Zotero.MIME.getMIMETypeFromFile(newFile); }