mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
small fixes
This commit is contained in:
parent
63aef6b832
commit
26523b011a
2 changed files with 3 additions and 4 deletions
|
@ -3,6 +3,7 @@ fs = require("fs")
|
|||
LocalFileWriter = require("./LocalFileWriter")
|
||||
Errors = require('./Errors')
|
||||
rimraf = require("rimraf")
|
||||
_ = require "underscore"
|
||||
|
||||
filterName = (key) ->
|
||||
return key.replace /\//g, "_"
|
||||
|
@ -29,9 +30,7 @@ module.exports =
|
|||
|
||||
# opts may be {start: Number, end: Number}
|
||||
getFileStream: (location, name, opts, _callback = (err, res)->) ->
|
||||
callback = (args...) ->
|
||||
_callback(args...)
|
||||
_callback = () ->
|
||||
callback = _.once _callback
|
||||
filteredName = filterName name
|
||||
logger.log location:location, name:filteredName, "getting file"
|
||||
sourceStream = fs.createReadStream "#{location}/#{filteredName}", opts
|
||||
|
|
|
@ -63,7 +63,7 @@ module.exports =
|
|||
PersistorManager.getFileStream bucket, convertedKey, callback
|
||||
|
||||
_convertFile: (bucket, originalKey, opts, callback)->
|
||||
@_writeS3FileToDisk bucket, originalKey, (err, originalFsPath)->
|
||||
@_writeS3FileToDisk bucket, originalKey, opts, (err, originalFsPath)->
|
||||
if err?
|
||||
return callback(err)
|
||||
done = (err, destPath)->
|
||||
|
|
Loading…
Reference in a new issue