Fix selftest failures where empty 'profile' directory may not exist (eg git)

* SelfTestBase
    only copy profile directory if it exists
This commit is contained in:
gojomo
2010-11-16 00:58:13 +00:00
parent cb7f96682b
commit c170390c0d
@@ -86,7 +86,10 @@ public abstract class SelfTestBase extends TmpDirTestCase {
// Copy the selftest's profile in the project directory to the
// default profile in the temporary Heritrix directory.
File tmpDefProfile = new File(tmpJobs, "selftest-job");
org.apache.commons.io.FileUtils.copyDirectory(new File(src, "profile"), tmpDefProfile);
File profileTemplate = new File(src, "profile");
if(profileTemplate.exists()) {
org.apache.commons.io.FileUtils.copyDirectory(profileTemplate, tmpDefProfile);
}
// Start up a Jetty that serves the selftest's content directory.
startHttpServer();