Sfoglia il codice sorgente

Correct usage of '==' rather than '=' when checking err.code.

Shane Kilkelly 11 anni fa
parent
commit
edc06c82e5
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      services/filestore/app/coffee/FSPersistorManager.coffee

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

@@ -37,7 +37,7 @@ module.exports =
     sourceStream = fs.createReadStream "#{location}/#{filteredName}", opts
     sourceStream.on 'error', (err) ->
       logger.err err:err, location:location, name:name, "Error reading from file"
-      if err.code = 'ENOENT'
+      if err.code == 'ENOENT'
         callback new Errors.NotFoundError(err.message), null
       else
         callback err