diff --git a/test/net/azib/ipscan/config/LabelsTest.java b/test/net/azib/ipscan/config/LabelsTest.java index b5afb3a9..573e47a0 100755 --- a/test/net/azib/ipscan/config/LabelsTest.java +++ b/test/net/azib/ipscan/config/LabelsTest.java @@ -83,7 +83,10 @@ public class LabelsTest { public static File findBaseDir() { URL url = LabelsTest.class.getClassLoader().getResource("messages.properties"); - return new File(url.getPath()).getParentFile().getParentFile(); + File parent = new File(url.getPath()); + while (!new File(parent, "build.xml").exists()) + parent = parent.getParentFile(); + return parent; } private void recurseAndTestLabels(File dir) throws IOException {