X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=Tools%2FSource%2FMigrationTools%2Forg%2Ftianocore%2Fmigration%2FCommon.java;h=19f64f7e512ea5dc874bc73714e755eff8f8340b;hp=ca51ed43adf4b4ea3bfa951300301a70f7340bf1;hb=7deec1481cb9ec381f147cf353bc4d4053871c6e;hpb=c8df018e44c9a88a582472339b645d4087848fd6 diff --git a/Tools/Source/MigrationTools/org/tianocore/migration/Common.java b/Tools/Source/MigrationTools/org/tianocore/migration/Common.java index ca51ed43ad..19f64f7e51 100644 --- a/Tools/Source/MigrationTools/org/tianocore/migration/Common.java +++ b/Tools/Source/MigrationTools/org/tianocore/migration/Common.java @@ -148,7 +148,9 @@ public final class Common { File test; if (type == DIR || type == BOTH) { - fda.toDo(path); + if (fda.dirFilter(path)) { + fda.run(path); + } } for (int i = 0 ; i < list.length ; i++) { test = new File(path + File.separator + list[i]); @@ -156,13 +158,19 @@ public final class Common { toDoAll(path + File.separator + list[i], fda, type); } else { if (type == FILE || type == BOTH) { - fda.toDo(path + File.separator + list[i]); + if (fda.fileFilter(path + File.separator + list[i])) { + fda.run(path + File.separator + list[i]); + } } } } } public static interface ForDoAll { - public void toDo(String filepath) throws Exception; + public void run(String filepath) throws Exception; + + public boolean dirFilter(String filepath); + + public boolean fileFilter(String filepath); } }