diff --git a/lib/preprocessor.js b/lib/preprocessor.js index 0101c9bb6..1c47849f4 100644 --- a/lib/preprocessor.js +++ b/lib/preprocessor.js @@ -77,13 +77,13 @@ var createPreprocessor = function (config, basePath, injector) { patterns = Object.keys(config) var retryCount = 0 var maxRetries = 3 - function handleFile (err, buffer) { + function readFileCallback (err, buffer) { if (err) { log.warn(err) if (retryCount < maxRetries) { retryCount++ log.warn('retrying ' + retryCount) - fs.readFile(file.originalPath, handleFile) + fs.readFile(file.originalPath, readFileCallback) return } else { throw err @@ -131,7 +131,7 @@ var createPreprocessor = function (config, basePath, injector) { nextPreprocessor(null, thisFileIsBinary ? buffer : buffer.toString()) }) } - return fs.readFile(file.originalPath, handleFile) + return fs.readFile(file.originalPath, readFileCallback) } } createPreprocessor.$inject = ['config.preprocessors', 'config.basePath', 'injector']