[Pkg-mozext-commits] [tabmixplus] 31/61: Missing module import from changeset 62a73e8f5295 cause - ReferenceError: OS is not defined. Use OS.Constants.Path to get path/to/profile/extensions instead of FileUtils

David Prévot taffit at moszumanska.debian.org
Fri Aug 28 19:09:20 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository tabmixplus.

commit 38a2e37fb680f2778ea67d7aa0e5b4e989480fab
Author: onemen <tabmix.onemen at gmail.com>
Date:   Sat Aug 1 16:35:06 2015 +0300

    Missing module import from changeset 62a73e8f5295 cause - ReferenceError: OS is not defined. Use OS.Constants.Path to get path/to/profile/extensions instead of FileUtils
---
 modules/log.jsm | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/modules/log.jsm b/modules/log.jsm
index 406230b..ce031ac 100644
--- a/modules/log.jsm
+++ b/modules/log.jsm
@@ -6,8 +6,10 @@ const {classes: Cc, interfaces: Ci, utils: Cu} = Components;
 
 Cu.import("resource://gre/modules/Services.jsm");
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "FileUtils",
-  "resource://gre/modules/FileUtils.jsm");
+
+XPCOMUtils.defineLazyGetter(this, "OS", function() {
+  return Cu.import("resource://gre/modules/osfile.jsm", {}).OS;
+});
 
 let gNextID = 1;
 
@@ -220,8 +222,8 @@ options = {
   // RegExp to remove path/to/profile/extensions from filename
   get _pathRegExp() {
     delete this._pathRegExp;
-    let folder = FileUtils.getDir("ProfD", ["extensions"]);
-    let path = folder.path.replace(/\\/g, "/") + "/";
+    let folder = OS.Path.join(OS.Constants.Path.profileDir, "extensions");
+    let path = folder.replace(/\\/g, "/") + "/";
     return (this._pathRegExp = new RegExp("jar:|file:///|" + path, "g"));
   },
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/tabmixplus.git



More information about the Pkg-mozext-commits mailing list