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

This commit is contained in:
trop[bot] 2018-10-04 09:23:19 +10:00 committed by Samuel Attard
parent bf928ee443
commit 73935bc5dd
2 changed files with 45 additions and 0 deletions

View file

@ -750,6 +750,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)