commit 8b13d473c7028c0adc0c5ba08b8f7b130a983090
parent 67e53885980d4494d95a125a61d914a1fc549c5e
Author: Simon Kornblith <simon@simonster.com>
Date: Sat, 17 Aug 2013 01:16:58 -0400
Import OS.File into Zotero global scope
Diffstat:
4 files changed, 1 insertion(+), 4 deletions(-)
diff --git a/chrome/content/zotero/xpcom/data/item.js b/chrome/content/zotero/xpcom/data/item.js
@@ -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);
diff --git a/chrome/content/zotero/xpcom/storage.js b/chrome/content/zotero/xpcom/storage.js
@@ -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();
diff --git a/chrome/content/zotero/xpcom/utilities_internal.js b/chrome/content/zotero/xpcom/utilities_internal.js
@@ -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();
diff --git a/chrome/content/zotero/xpcom/zotero.js b/chrome/content/zotero/xpcom/zotero.js
@@ -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