Skip to content

Commit

Permalink
partial fix for GRAILS-9273 "DirectoryWatcher: files are incorrectly …
Browse files Browse the repository at this point in the history
…considered "new" if their extension wasn't watched for that directory"
  • Loading branch information
graemerocher committed Feb 18, 2013
1 parent 1c6d4cf commit 33ff09f
Showing 1 changed file with 3 additions and 2 deletions.
Expand Up @@ -146,8 +146,9 @@ public void onChange(File file) {

public void onNew(File file) {
LOG.info("File [" + file + "] added. Applying changes to application.");
if (!file.getName().toLowerCase().endsWith(".properties")) {
// only sleep for source files, not i18n files
String fileName = file.getName();
if (fileName.endsWith(".groovy") || fileName.endsWith(".java")) {
// only wait a bit for source files to give the user a chance to make the class valid
sleep(5000);
}
compileIfSource(file);
Expand Down

0 comments on commit 33ff09f

Please sign in to comment.