Handle ".." in asar path, fix #1982

This commit is contained in:
Cheng Zhao 2015-06-17 15:52:29 +08:00
parent ad59393641
commit db8ffe1dc7

View file

@ -20,6 +20,7 @@ process.on 'exit', ->
splitPath = (p) ->
return [false] if typeof p isnt 'string'
return [true, p, ''] if p.substr(-5) is '.asar'
p = path.normalize p
index = p.lastIndexOf ".asar#{path.sep}"
return [false] if index is -1
[true, p.substr(0, index + 5), p.substr(index + 6)]