Explorar el Código

Update FSPersistorManager.coffee

Do not propagate the error if trying to delete a directory that does not exist.
c4live hace 12 años
padre
commit
1e42221954
Se han modificado 1 ficheros con 4 adiciones y 1 borrados
  1. 4 1
      services/filestore/app/coffee/FSPersistorManager.coffee

+ 4 - 1
services/filestore/app/coffee/FSPersistorManager.coffee

@@ -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