make base dir search smarter (and work under Intellij)

This commit is contained in:
Anton Keks 2011-03-06 20:47:31 +02:00
parent ef0c7f9b23
commit b7d0d0aba4

View File

@ -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 {