Sfoglia il codice sorgente

Add in missing error check

James Allen 12 anni fa
parent
commit
49b7cdc854
1 ha cambiato i file con 2 aggiunte e 1 eliminazioni
  1. 2 1
      services/clsi/app/coffee/OutputFileFinder.coffee

+ 2 - 1
services/clsi/app/coffee/OutputFileFinder.coffee

@@ -9,7 +9,8 @@ module.exports = OutputFileFinder =
 		for resource in resources
 			incomingResources[resource.path] = true
 
-		OutputFileFinder._getAllFiles directory, (error, allFiles) ->
+		OutputFileFinder._getAllFiles directory, (error, allFiles = []) ->
+			return callback(error) if error?
 			jobs = []
 			outputFiles = []
 			for file in allFiles