Skip to content

TagSpaces is an offline, open source, document manager with tagging support

mozilla fixed export

Borislav Sapundzhiev1eadfd13140c
diff --git a/data/mozilla/ioutils.js b/data/mozilla/ioutils.js
index ca2775730..02b2e637b 100644
--- a/data/mozilla/ioutils.js
+++ b/data/mozilla/ioutils.js
@@ -602,27 +602,27 @@ exports.getFileProperties = function(filePath, worker) {
} catch (ex) {
console.error("Error getting properties for file " + filePath + " - " + ex);
}
+};
- exports.getFileContent = function(fullPath, result, error) {
+exports.getFileContent = function(fullPath, result, error) {
- var fileURL = fullPath;
- if (fileURL.indexOf("file://") === -1) {
- fileURL = "file://" + fileURL;
- }
-
- let xhr = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"]
- .createInstance(Ci.nsIXMLHttpRequest);
-
- request.onload = function() {
- result(xhr.response);
- };
- request.onerror = function() {
- error(xhr.status);
- };
-
- xhr.mozBackgroundRequest = true;
- xhr.responseType = "arraybuffer";
- xhr.open("GET", fileURL, true);
- xhr.send(null);
+ var fileURL = fullPath;
+ if (fileURL.indexOf("file://") === -1) {
+ fileURL = "file://" + fileURL;
}
+
+ let xhr = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"]
+ .createInstance(Ci.nsIXMLHttpRequest);
+
+ request.onload = function() {
+ result(xhr.response);
+ };
+ request.onerror = function() {
+ error(xhr.status);
+ };
+
+ xhr.mozBackgroundRequest = true;
+ xhr.responseType = "arraybuffer";
+ xhr.open("GET", fileURL, true);
+ xhr.send(null);
};