Import OS.File into Zotero global scope

This commit is contained in:
Simon Kornblith 2013-08-17 01:16:58 -04:00
parent 67e5388598
commit 8b13d473c7
4 changed files with 1 additions and 4 deletions

View file

@ -2980,7 +2980,6 @@ Zotero.Item.prototype.fileExistsAsync = function () {
}
var nsIFile = self.getFile(null, true);
Components.utils.import("resource://gre/modules/osfile.jsm");
return Q(OS.File.exists(nsIFile.path))
.then(function(exists) {
self._updateAttachmentStates(exists);

View file

@ -938,8 +938,6 @@ Zotero.Sync.Storage = new function () {
throw new Task.Result(changed);
}
Components.utils.import("resource://gre/modules/osfile.jsm");
let checkItems = function () {
if (!items.length) return Q();

View file

@ -96,7 +96,6 @@ Zotero.Utilities.Internal = {
* rather than hex string
*/
"md5Async": function (file, base64) {
Components.utils.import("resource://gre/modules/osfile.jsm");
const CHUNK_SIZE = 16384;
var deferred = Q.defer();

View file

@ -44,6 +44,7 @@ const ZOTERO_CONFIG = {
Components.utils.import("resource://zotero/q.js");
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
Components.utils.import("resource://gre/modules/Services.jsm");
Components.utils.import("resource://gre/modules/osfile.jsm");
/*
* Core functions