You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2009/10/21 22:53:48 UTC
svn commit: r828210 -
/tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java
Author: markt
Date: Wed Oct 21 20:53:47 2009
New Revision: 828210
URL: http://svn.apache.org/viewvc?rev=828210&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=48009
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
Modified:
tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java
Modified: tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java?rev=828210&r1=828209&r2=828210&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java (original)
+++ tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java Wed Oct 21 20:53:47 2009
@@ -1103,6 +1103,17 @@
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) {
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org