Permalink
Browse files

Fix FileNotFound exception if classpath entry not found in filesystem

  • Loading branch information...
1 parent f13c5c5 commit b45a6ea2796c1ab5cf534853ac710383691ac56c @marekpiechut marekpiechut committed Sep 19, 2012
Showing with 7 additions and 5 deletions.
  1. +7 −5 src-compiler/GroovyCompiler.groovy
@@ -43,11 +43,13 @@ class GroovyCompiler {
static def getSourceFiles = { path, regex = /^[^.].*[.](groovy|java)$/ ->
def list = []
- path.eachFileRecurse(FileType.FILES, { f ->
- if (f =~ regex) {
- list << f
- }
- })
+ if(path.exists()) {
+ path.eachFileRecurse(FileType.FILES, { f ->
+ if (f =~ regex) {
+ list << f
+ }
+ })
+ }
return list
}

0 comments on commit b45a6ea

Please sign in to comment.