mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -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,8 +75,9 @@ module.exports = UrlCache =
|
|||
readStream = fs.createReadStream(from)
|
||||
writeStream.on "error", callbackOnce
|
||||
readStream.on "error", callbackOnce
|
||||
writeStream.on "close", () -> callbackOnce()
|
||||
readStream.pipe(writeStream)
|
||||
writeStream.on "close", callbackOnce
|
||||
writeStream.on "open", () ->
|
||||
readStream.pipe(writeStream)
|
||||
|
||||
_clearUrlFromCache: (project_id, url, callback = (error) ->) ->
|
||||
UrlCache._clearUrlDetails project_id, url, (error) ->
|
||||
|
|
Loading…
Reference in a new issue