diff options
author | Matt A. Tobin <email@mattatobin.com> | 2020-02-01 23:45:36 -0500 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2020-02-01 23:45:36 -0500 |
commit | 7d21d02d532fed5613501de63f8b3d50144a751f (patch) | |
tree | 06ae93efe12de8b25d207b13e81d8f6c2c0f2f7d /toolkit/content/contentAreaUtils.js | |
parent | a18c27ddde9bb269948d5849df4840273237a24b (diff) | |
download | UXP-7d21d02d532fed5613501de63f8b3d50144a751f.tar UXP-7d21d02d532fed5613501de63f8b3d50144a751f.tar.gz UXP-7d21d02d532fed5613501de63f8b3d50144a751f.tar.lz UXP-7d21d02d532fed5613501de63f8b3d50144a751f.tar.xz UXP-7d21d02d532fed5613501de63f8b3d50144a751f.zip |
Issue #65 - Remove AppConstants from toolkit/content
Diffstat (limited to 'toolkit/content/contentAreaUtils.js')
-rw-r--r-- | toolkit/content/contentAreaUtils.js | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/toolkit/content/contentAreaUtils.js b/toolkit/content/contentAreaUtils.js index 736fb7dfc..2512804fa 100644 --- a/toolkit/content/contentAreaUtils.js +++ b/toolkit/content/contentAreaUtils.js @@ -24,8 +24,6 @@ XPCOMUtils.defineLazyModuleGetter(this, "Task", "resource://gre/modules/Task.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "Deprecated", "resource://gre/modules/Deprecated.jsm"); -XPCOMUtils.defineLazyModuleGetter(this, "AppConstants", - "resource://gre/modules/AppConstants.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "NetUtil", "resource://gre/modules/NetUtil.jsm"); @@ -1161,10 +1159,10 @@ function getNormalizedLeafName(aFile, aDefaultExtension) if (!aDefaultExtension) return aFile; - if (AppConstants.platform == "win") { - // Remove trailing dots and spaces on windows - aFile = aFile.replace(/[\s.]+$/, ""); - } +#ifdef XP_WIN + // Remove trailing dots and spaces on windows + aFile = aFile.replace(/[\s.]+$/, ""); +#endif // Remove leading dots aFile = aFile.replace(/^\.+/, ""); |