ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Rosenberg" <>
Subject What I did to
Date Fri, 19 Jan 2001 07:50:56 GMT
In, when explicitly deleting a directory with verbose mode, 
you get double reporting of the "Deleting" message:

Deleting directory /foo/bar/
Deleting directory /foo/bar/

This is because the message is logged always in the execute() method,
and then again within the removeDir() method, for verbose mode.

So, I commented out the log message in execute():

        // delete the directory
        if (dir != null && dir.exists() && dir.isDirectory() && !usedMatchingTask)
        // don't need this, the same message is logged below in removeDir  --jason
            //log("Deleting directory " + dir.getAbsolutePath());

And changed the logging in the removeDir() method to always happen, instead
of just for verbose mode:

        // log this normally, not only in verbose mode  --jason
        // log("Deleting directory " + d.getAbsolutePath(), verbosity);
        log("Deleting directory " + d.getAbsolutePath());

The double reporting is especially noticeable when you are deleting
an empty directory.

I am using the 1.2 source distribution, as a starting point.


View raw message