Răsfoiți Sursa

skip cache directory error when empty

Brian Gough 11 ani în urmă
părinte
comite
c26de9554d
1 a modificat fișierele cu 1 adăugiri și 0 ștergeri
  1. 1 0
      services/clsi/app/coffee/OutputCacheManager.coffee

+ 1 - 0
services/clsi/app/coffee/OutputCacheManager.coffee

@@ -83,6 +83,7 @@ module.exports = OutputCacheManager =
 		# look in compileDir for build dirs and delete if > N or age of mod time > T
 		fs.readdir cacheRoot, (err, results) ->
 			if err?
+				return callback(null) if err.code == 'ENOENT'	# cache directory is empty
 				logger.error err: err, project_id: cacheRoot, "error clearing cache"
 				return callback(err)