Make __filename normalized
This can make sure __filename and __dirname on Windows use "\" as path delimeter.
This commit is contained in:
parent
dba2fa31b6
commit
8c29ffd084
2 changed files with 3 additions and 3 deletions
|
@ -35,7 +35,7 @@ if window.location.protocol in ['file:', 'asar:']
|
|||
window.location.pathname.substr 1
|
||||
else
|
||||
window.location.pathname
|
||||
global.__filename = decodeURIComponent pathname
|
||||
global.__filename = path.normalize decodeURIComponent(pathname)
|
||||
global.__dirname = path.dirname global.__filename
|
||||
|
||||
# Set module's filename so relative require can work as expected.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue