commit 6941f96a5a912e980d332db1bcb9c355c5a4720b
parent c3df3fcebfbe8f775f90502e95a2b8332ad4d60b
Author: Dan Stillman <dstillman@zotero.org>
Date: Sat, 2 Dec 2017 04:11:35 -0500
Clear Windows read-only attribute when storing file
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git 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);
}