]> khamidou — GitHub mirrors - electron.git/commitdiff
Handle ".." in asar path, fix #1982
authorCheng Zhao <zcbenz@gmail.com>
Wed, 17 Jun 2015 07:52:29 +0000 (15:52 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Wed, 17 Jun 2015 07:52:49 +0000 (15:52 +0800)
atom/common/lib/asar.coffee

index 7ce89156285d9cf89f36b6a54a0f5415699dbdba..ee6d18e4358f52467dfe86034ed1007793714f23 100644 (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)]