Skip CVS directories during recursive comparison

This commit is contained in:
Andrea Aime 2006-06-11 13:48:04 +00:00
parent 1a066ccff8
commit e63dfd9fa8
2 changed files with 4 additions and 4 deletions

View File

@ -115,11 +115,11 @@ public class TestUtils {
/**
* Deletes the content of the folder, eventually in a recursive way (but
* avoids deleting eventual .cvsignore files)
* avoids deleting eventual .cvsignore files and CVS folders)
*/
public static void cleanFolder(File folder, boolean recurse) {
for (File f : folder.listFiles()) {
if (f.isDirectory()) {
if (f.isDirectory() && !f.getName().equals("CVS")) {
if (recurse) {
cleanFolder(f, true);
if (f.list().length == 0)

View File

@ -115,11 +115,11 @@ public class TestUtils {
/**
* Deletes the content of the folder, eventually in a recursive way (but
* avoids deleting eventual .cvsignore files)
* avoids deleting eventual .cvsignore files and CVS folders)
*/
public static void cleanFolder(File folder, boolean recurse) {
for (File f : folder.listFiles()) {
if (f.isDirectory()) {
if (f.isDirectory() && !f.getName().equals("CVS")) {
if (recurse) {
cleanFolder(f, true);
if (f.list().length == 0)