Procházet zdrojové kódy

Update FSPersistorManager.coffee

Do not propagate the error if trying to delete a directory that does not exist.
c4live před 12 roky
rodič
revize
1e42221954

+ 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