Import OS.File into Zotero global scope
This commit is contained in:
parent
67e5388598
commit
8b13d473c7
4 changed files with 1 additions and 4 deletions
|
@ -2980,7 +2980,6 @@ Zotero.Item.prototype.fileExistsAsync = function () {
|
||||||
}
|
}
|
||||||
|
|
||||||
var nsIFile = self.getFile(null, true);
|
var nsIFile = self.getFile(null, true);
|
||||||
Components.utils.import("resource://gre/modules/osfile.jsm");
|
|
||||||
return Q(OS.File.exists(nsIFile.path))
|
return Q(OS.File.exists(nsIFile.path))
|
||||||
.then(function(exists) {
|
.then(function(exists) {
|
||||||
self._updateAttachmentStates(exists);
|
self._updateAttachmentStates(exists);
|
||||||
|
|
|
@ -938,8 +938,6 @@ Zotero.Sync.Storage = new function () {
|
||||||
throw new Task.Result(changed);
|
throw new Task.Result(changed);
|
||||||
}
|
}
|
||||||
|
|
||||||
Components.utils.import("resource://gre/modules/osfile.jsm");
|
|
||||||
|
|
||||||
let checkItems = function () {
|
let checkItems = function () {
|
||||||
if (!items.length) return Q();
|
if (!items.length) return Q();
|
||||||
|
|
||||||
|
|
|
@ -96,7 +96,6 @@ Zotero.Utilities.Internal = {
|
||||||
* rather than hex string
|
* rather than hex string
|
||||||
*/
|
*/
|
||||||
"md5Async": function (file, base64) {
|
"md5Async": function (file, base64) {
|
||||||
Components.utils.import("resource://gre/modules/osfile.jsm");
|
|
||||||
const CHUNK_SIZE = 16384;
|
const CHUNK_SIZE = 16384;
|
||||||
|
|
||||||
var deferred = Q.defer();
|
var deferred = Q.defer();
|
||||||
|
|
|
@ -44,6 +44,7 @@ const ZOTERO_CONFIG = {
|
||||||
Components.utils.import("resource://zotero/q.js");
|
Components.utils.import("resource://zotero/q.js");
|
||||||
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
|
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
|
||||||
Components.utils.import("resource://gre/modules/Services.jsm");
|
Components.utils.import("resource://gre/modules/Services.jsm");
|
||||||
|
Components.utils.import("resource://gre/modules/osfile.jsm");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Core functions
|
* Core functions
|
||||||
|
|
Loading…
Reference in a new issue