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,8 +75,9 @@ module.exports = UrlCache =
|
||||||
readStream = fs.createReadStream(from)
|
readStream = fs.createReadStream(from)
|
||||||
writeStream.on "error", callbackOnce
|
writeStream.on "error", callbackOnce
|
||||||
readStream.on "error", callbackOnce
|
readStream.on "error", callbackOnce
|
||||||
writeStream.on "close", () -> callbackOnce()
|
writeStream.on "close", callbackOnce
|
||||||
readStream.pipe(writeStream)
|
writeStream.on "open", () ->
|
||||||
|
readStream.pipe(writeStream)
|
||||||
|
|
||||||
_clearUrlFromCache: (project_id, url, callback = (error) ->) ->
|
_clearUrlFromCache: (project_id, url, callback = (error) ->) ->
|
||||||
UrlCache._clearUrlDetails project_id, url, (error) ->
|
UrlCache._clearUrlDetails project_id, url, (error) ->
|
||||||
|
|
Loading…
Reference in a new issue