fix: support ASAR in fs.copyFile (#14942)

This commit is contained in:
Cheng Zhao 2018-10-04 01:36:20 +09:00 committed by Shelley Vohr
parent 820d99d37f
commit 4c4d8c5bfa
2 changed files with 45 additions and 0 deletions

View file

@ -748,6 +748,12 @@
}
}
// Strictly implementing the flags of fs.copyFile is hard, just do a simple
// implementation for now. Doing 2 copies won't spend much time more as OS
// has filesystem caching.
overrideAPI(fs, 'copyFile')
overrideAPISync(fs, 'copyFileSync')
overrideAPI(fs, 'open')
overrideAPI(childProcess, 'execFile')
overrideAPISync(process, 'dlopen', 1)