From 03be938444eb4a79cbec853bdc9af0847ae44d1e Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Tue, 21 May 2024 01:55:22 -0400 Subject: [PATCH] Don't try to use `Zotero.isWin` in `OS.File` shim --- chrome/content/zotero/osfile.mjs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/osfile.mjs b/chrome/content/zotero/osfile.mjs index e87ad0ecf5..8fbc56cb1b 100644 --- a/chrome/content/zotero/osfile.mjs +++ b/chrome/content/zotero/osfile.mjs @@ -1,6 +1,8 @@ // // Compatibility shims from the Mozilla codebase // +const isWin = Services.appinfo.OS == 'WINNT'; + export let OS = { Constants: { Path: { @@ -184,7 +186,7 @@ export let OS = { setPermissions: async function (path, { unixMode, winAttributes } = {}) { await IOUtils.setPermissions(path, unixMode); - if (winAttributes && Zotero.isWin) { + if (winAttributes && isWin) { let { readOnly, hidden, system } = winAttributes; await IOUtils.setWindowsAttributes(path, { readOnly, hidden, system }); }