Author: markt
Date: Thu Aug 14 01:49:40 2008
New Revision: 685818

URL: http://svn.apache.org/viewvc?rev=685818&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=42899
When saving config from admin app, correctly handle case where old config file 
does not exist.

Modified:
    
tomcat/container/tc5.5.x/modules/storeconfig/src/share/org/apache/catalina/storeconfig/StandardContextSF.java
    tomcat/container/tc5.5.x/webapps/docs/changelog.xml
    tomcat/current/tc5.5.x/STATUS.txt

Modified: 
tomcat/container/tc5.5.x/modules/storeconfig/src/share/org/apache/catalina/storeconfig/StandardContextSF.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/modules/storeconfig/src/share/org/apache/catalina/storeconfig/StandardContextSF.java?rev=685818&r1=685817&r2=685818&view=diff
==============================================================================
--- 
tomcat/container/tc5.5.x/modules/storeconfig/src/share/org/apache/catalina/storeconfig/StandardContextSF.java
 (original)
+++ 
tomcat/container/tc5.5.x/modules/storeconfig/src/share/org/apache/catalina/storeconfig/StandardContextSF.java
 Thu Aug 14 01:49:40 2008
@@ -156,8 +156,9 @@
         if (mover != null) {
             // Bugzilla 37781 Check to make sure we can write this output file
             if ((mover.getConfigOld() == null)
-                    || (!mover.getConfigOld().isFile())
-                    || (!mover.getConfigOld().canWrite())) {
+                    || (mover.getConfigOld().isDirectory())
+                    || (mover.getConfigOld().exists() &&
+                            !mover.getConfigOld().canWrite())) {
                 log.error("Cannot move orignal context output file at "
                         + mover.getConfigOld());
                 throw new IOException("Context orginal file at "

Modified: tomcat/container/tc5.5.x/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/webapps/docs/changelog.xml?rev=685818&r1=685817&r2=685818&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/webapps/docs/changelog.xml (original)
+++ tomcat/container/tc5.5.x/webapps/docs/changelog.xml Thu Aug 14 01:49:40 2008
@@ -126,6 +126,10 @@
   <subsection name="Webapps">
     <changelog>
       <fix>
+        <bug>42899</bug>: When saving config from admin app, correctly handle
+        case where the old config file does not exist. (markt)
+      </fix>
+      <fix>
         <bug>44541</bug>: Document packetSize attribute for AJP connector.
         (markt)
       </fix>

Modified: tomcat/current/tc5.5.x/STATUS.txt
URL: 
http://svn.apache.org/viewvc/tomcat/current/tc5.5.x/STATUS.txt?rev=685818&r1=685817&r2=685818&view=diff
==============================================================================
--- tomcat/current/tc5.5.x/STATUS.txt (original)
+++ tomcat/current/tc5.5.x/STATUS.txt Thu Aug 14 01:49:40 2008
@@ -49,13 +49,6 @@
   +1: markt, yoavs, fhanik
   -1: 
 
-* Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=42899
-  When saving config from admin app, correctly handle case where old config 
file
-  does not exist.
-  http://people.apache.org/~markt/patches/2008-05-10-bug42899.patch
-  +1: markt, yoavs, fhanik
-  -1: 
-
 * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=45015
   You can't use an unescaped quote if you quote the value with that character
   http://svn.apache.org/viewvc?rev=657231&view=rev



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to