Add a check in case the file is in the middle of being renamed. It isn't perfect (it can't be) but this should cover most cases
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@828210
13f79535-47bb-0310-9956-
ffa450edef68
return;
}
} else {
+ // There is a chance the the resource was only missing
+ // temporarily eg renamed during a text editor save
+ try {
+ Thread.sleep(500);
+ } catch (InterruptedException e1) {
+ // Ignore
+ }
+ // Recheck the resource to see if it was really deleted
+ if (resource.exists()) {
+ continue;
+ }
long lastModified =
app.redeployResources.get(resources[i]).longValue();
if (lastModified == 0L) {