diff --git a/chrome/content/zotero/xpcom/file.js b/chrome/content/zotero/xpcom/file.js index 6e2755b03..c28217e6e 100644 --- a/chrome/content/zotero/xpcom/file.js +++ b/chrome/content/zotero/xpcom/file.js @@ -690,6 +690,21 @@ Zotero.File = new function(){ } + this.setNormalFilePermissions = function (file) { + return OS.File.setPermissions( + file, + { + unixMode: 0o644, + winAttributes: { + readOnly: false, + hidden: false, + system: false + } + } + ); + } + + this.createShortened = function (file, type, mode, maxBytes) { file = this.pathToFile(file); diff --git a/chrome/content/zotero/xpcom/storage/storageLocal.js b/chrome/content/zotero/xpcom/storage/storageLocal.js index 74cd5f44d..1816ad697 100644 --- a/chrome/content/zotero/xpcom/storage/storageLocal.js +++ b/chrome/content/zotero/xpcom/storage/storageLocal.js @@ -932,7 +932,7 @@ Zotero.Sync.Storage.Local = { Zotero.File.checkFileAccessError(e, destPath, 'create'); } - yield OS.File.setPermissions(destPath, { unixMode: 0o644 }); + yield Zotero.File.setNormalFilePermissions(destPath); // If we're renaming the main file, processDownload() needs to know if (renamed) {