Simplify testing with Eclipse when using SVN checkout from parent
authorSebastian Bazley <sebb@apache.org>
Wed, 1 Jun 2011 12:18:31 +0000 (12:18 +0000)
committerSebastian Bazley <sebb@apache.org>
Wed, 1 Jun 2011 12:18:31 +0000 (12:18 +0000)
git-svn-id: https://svn.apache.org/repos/asf/mina/ftpserver/trunk@1130124 13f79535-47bb-0310-9956-ffa450edef68

core/src/test/java/org/apache/ftpserver/test/TestUtil.java

index 871cb24..92483c3 100644 (file)
@@ -51,6 +51,12 @@ public class TestUtil {
         if (basedir != null) {
             return new File(basedir);
         } else {
+            // Are we using Eclipse based on parent directory?
+            File core = new File("core");
+            File check = new File(core,"src");
+            if (check.isDirectory()) {
+                return core;
+            }
             return new File(".");
         }
     }