Don't try to use Zotero.isWin
in OS.File
shim
This commit is contained in:
parent
eed7acff08
commit
03be938444
1 changed files with 3 additions and 1 deletions
|
@ -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 });
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue