DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25822>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25822

tomcat shouldn't write tomcat-users.xml at startup





------- Additional Comments From [EMAIL PROTECTED]  2004-01-05 16:19 -------
My first patch doesn't work since it doesn't detect user modification.
My second remove the first patch and implements the following :
- use a temporary file for write instead of conf/tomcat-users.xml.new
- check wether conf/tomcat-users.xml is writable (if it exists)
- rename the temporary files to conf/tomcat-users.xml
It removes the need to write in the directory.

By the way the old code had a very little bug :

        File fileOld = new File(pathnameNew);
        if (!fileOld.isAbsolute()) {
            fileOld =
                new File(System.getProperty("catalina.base"), pathnameOld);
        }

when I expected 

        File fileOld = new File(pathnameOld);
        if (!fileOld.isAbsolute()) {
            fileOld =
                new File(System.getProperty("catalina.base"), pathnameOld);
        }

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

Reply via email to