mirror of
https://github.com/atom/atom.git
synced 2026-01-20 20:38:09 -05:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user