Skip to content
This repository has been archived by the owner on Mar 30, 2023. It is now read-only.

Commit

Permalink
fix node 0.6.0 compat mode for {fs,path}.exists(Sync)
Browse files Browse the repository at this point in the history
  • Loading branch information
xaiki authored and ozten committed Dec 14, 2012
1 parent 0d882ad commit 3d69d63
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/i18n.js
Expand Up @@ -48,6 +48,8 @@ exports.abide = function (options) {
if (! options.i18n_json_dir) options.i18n_json_dir = 'resources/static/i18n/';
if (! options.logger) options.logger = console;

var exists = fs.existsSync || path.existsSync;

var logger = options.logger;

var mo_file_path = function (locale) {
Expand All @@ -68,8 +70,8 @@ exports.abide = function (options) {
default_locale = localeFrom(options.default_lang);

mo_cache[l] = {
mo_exists: path.existsSync(mo_file_path(l)),
/* json_exists: path.existsSync(json_file_path(l)), */
mo_exists: path.exists(mo_file_path(l)),
/* json_exists: path.exists(json_file_path(l)), */
gt: null
};
if (l !== debug_locale) {
Expand Down

0 comments on commit 3d69d63

Please sign in to comment.