Merge pull request #2986 from Gared/fix_existssync_deprecated
Use fs.statSync instead of fs.existsSync (deprecated)pull/2998/head
commit
5a868254e3
|
@ -5,7 +5,7 @@ var languages = require('languages4translatewiki')
|
|||
, npm = require('npm')
|
||||
, plugins = require('ep_etherpad-lite/static/js/pluginfw/plugins.js').plugins
|
||||
, semver = require('semver')
|
||||
, existsSync = semver.gt(process.version, '0.7.0') ? fs.existsSync : path.existsSync
|
||||
, existsSync = fs.statSync || fs.existsSync || path.existsSync
|
||||
;
|
||||
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ var zlib = require('zlib');
|
|||
var settings = require('./Settings');
|
||||
var semver = require('semver');
|
||||
|
||||
var existsSync = (semver.satisfies(process.version, '>=0.8.0')) ? fs.existsSync : path.existsSync;
|
||||
var existsSync = fs.statSync || fs.existsSync || path.existsSync;
|
||||
|
||||
var CACHE_DIR = path.normalize(path.join(settings.root, 'var/'));
|
||||
CACHE_DIR = existsSync(CACHE_DIR) ? CACHE_DIR : undefined;
|
||||
|
|
Loading…
Reference in New Issue