From: Cheng Zhao Date: Tue, 14 Oct 2014 11:27:47 +0000 (+0800) Subject: Fix __dirname for page in asar package X-Git-Tag: v0.18.0~2 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=dba2fa31b6fb9cb28c5b0565d5e7065c83b149c2;p=electron.git Fix __dirname for page in asar package Fixes #694. --- diff --git a/atom/renderer/lib/init.coffee b/atom/renderer/lib/init.coffee index 3fb4ceaa..a6f571b2 100644 --- a/atom/renderer/lib/init.coffee +++ b/atom/renderer/lib/init.coffee @@ -31,7 +31,7 @@ window.addEventListener 'unload', -> # Set the __filename to the path of html file if it's file: or asar: protocol. if window.location.protocol in ['file:', 'asar:'] pathname = - if process.platform is 'win32' + if process.platform is 'win32' and window.location.pathname[0] is '/' window.location.pathname.substr 1 else window.location.pathname