Normalize process.resourcesPath on load

This ensures the drive letter is consistent on Windows for when
package paths are compared to the resources path to determine
whether to use the metadata cache for a bundled package.

Closes #3932
This commit is contained in:
Kevin Sawicki 2014-10-30 10:30:10 -07:00
parent 9fca1d26f1
commit 75627f50a2

View File

@ -5,6 +5,9 @@ window.onload = function() {
// Skip "?loadSettings=".
var loadSettings = JSON.parse(decodeURIComponent(location.search.substr(14)));
// Normalize to make sure drive letter case is consistent on Windows
process.resourcesPath = path.normalize(process.resourcesPath);
var devMode = loadSettings.devMode || !loadSettings.resourcePath.startsWith(process.resourcesPath + require('path').sep);
// Require before the module cache in dev mode