mirror of
https://github.com/electron/electron.git
synced 2026-05-02 03:00:22 -04:00
Handle ".." in asar path, fix #1982
This commit is contained in:
@@ -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)]
|
||||
|
||||
Reference in New Issue
Block a user