mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
clean up stream handling for file copy
This commit is contained in:
parent
56f1ffa067
commit
aa32cbc1ee
1 changed files with 3 additions and 2 deletions
|
@ -75,7 +75,8 @@ module.exports = UrlCache =
|
|||
readStream = fs.createReadStream(from)
|
||||
writeStream.on "error", callbackOnce
|
||||
readStream.on "error", callbackOnce
|
||||
writeStream.on "close", () -> callbackOnce()
|
||||
writeStream.on "close", callbackOnce
|
||||
writeStream.on "open", () ->
|
||||
readStream.pipe(writeStream)
|
||||
|
||||
_clearUrlFromCache: (project_id, url, callback = (error) ->) ->
|
||||
|
|
Loading…
Reference in a new issue