Update FSPersistorManager.coffee

Do not propagate the error if trying to delete a directory that does not exist.
This commit is contained in:
c4live 2014-06-05 14:10:05 +02:00
parent a9be97622b
commit 1e42221954

View file

@ -60,7 +60,10 @@ module.exports =
filteredName = filterName name
fs.rmdir "#{location}/#{filteredName}", (err) ->
logger.err err:err, location:location, name:filteredName, "Error on rmdir."
callback err
if err and err.errno != 34
callback err
else
callback()
checkIfFileExists:(location, name, callback = (err,exists)->)->
filteredName = filterName name