diff --git a/lib/browser/init.js b/lib/browser/init.js index d6a18361d69..e1105df9b13 100644 --- a/lib/browser/init.js +++ b/lib/browser/init.js @@ -11,19 +11,19 @@ var slice = [].slice; process.argv.splice(1, 1); // Clear search paths. -require(path.resolve(__dirname, '..', 'common', 'reset-search-paths')); +require('../common/reset-search-paths'); // Import common settings. -require(path.resolve(__dirname, '..', 'common', 'init')); +require('../common/init'); var globalPaths = Module.globalPaths; if (!process.env.ELECTRON_HIDE_INTERNAL_MODULES) { - globalPaths.push(path.resolve(__dirname, 'api')); + globalPaths.push(path.join(__dirname, 'api')); } // Expose public APIs. -globalPaths.push(path.resolve(__dirname, 'api', 'exports')); +globalPaths.push(path.join(__dirname, 'api', 'exports')); if (process.platform === 'win32') { // Redirect node's console to use our own implementations, since node can not diff --git a/lib/renderer/init.js b/lib/renderer/init.js index 334aebda9cf..45ea2d45654 100644 --- a/lib/renderer/init.js +++ b/lib/renderer/init.js @@ -9,19 +9,19 @@ const Module = require('module'); process.argv.splice(1, 1); // Clear search paths. -require(path.resolve(__dirname, '..', 'common', 'reset-search-paths')); +require('../common/reset-search-paths'); // Import common settings. -require(path.resolve(__dirname, '..','common', 'init')); +require('../common/init'); var globalPaths = Module.globalPaths; if (!process.env.ELECTRON_HIDE_INTERNAL_MODULES) { - globalPaths.push(path.resolve(__dirname, 'api')); + globalPaths.push(path.join(__dirname, 'api')); } // Expose public APIs. -globalPaths.push(path.resolve(__dirname, 'api', 'exports')); +globalPaths.push(path.join(__dirname, 'api', 'exports')); // The global variable will be used by ipc for event dispatching var v8Util = process.atomBinding('v8_util');