Просмотр исходного кода

Fix decaf error in FSPersistorManager

Simon Detheridge 6 лет назад
Родитель
Сommit
e06c03e536
1 измененных файлов с 5 добавлено и 5 удалено
  1. 5 5
      services/filestore/app/js/FSPersistorManager.js

+ 5 - 5
services/filestore/app/js/FSPersistorManager.js

@@ -82,11 +82,11 @@ module.exports = {
           { err, location, filteredName: name },
           'Error reading from file'
         )
-      }
-      if (err.code === 'ENOENT') {
-        return callback(new Errors.NotFoundError(err.message), null)
-      } else {
-        return callback(err, null)
+        if (err.code === 'ENOENT') {
+          return callback(new Errors.NotFoundError(err.message), null)
+        } else {
+          return callback(err, null)
+        }
       }
       opts.fd = fd
       const sourceStream = fs.createReadStream(null, opts)