mirror of
https://github.com/electron/electron.git
synced 2026-05-02 03:00:22 -04:00
Add executable permission in CopyFileOut
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
asar = process.binding 'atom_common_asar'
|
||||
child_process = require 'child_process'
|
||||
fs = require 'fs'
|
||||
path = require 'path'
|
||||
util = require 'util'
|
||||
|
||||
@@ -84,11 +83,6 @@ overrideAPISync = (module, name, arg = 0) ->
|
||||
newPath = archive.copyFileOut filePath
|
||||
notFoundError asarPath, filePath unless newPath
|
||||
|
||||
stat = archive.stat filePath
|
||||
|
||||
if stat.executable
|
||||
fs.chmodSync(newPath, 0o755)
|
||||
|
||||
arguments[arg] = newPath
|
||||
old.apply this, arguments
|
||||
|
||||
@@ -108,11 +102,6 @@ overrideAPI = (module, name, arg = 0) ->
|
||||
newPath = archive.copyFileOut filePath
|
||||
return notFoundError asarPath, filePath, callback unless newPath
|
||||
|
||||
stat = archive.stat filePath
|
||||
|
||||
if stat.executable
|
||||
fs.chmodSync(newPath, 0o755)
|
||||
|
||||
arguments[arg] = newPath
|
||||
old.apply this, arguments
|
||||
|
||||
|
||||
Reference in New Issue
Block a user