Support running the test system on Windows 7.

This commit is contained in:
lotodore
2011-06-12 18:41:48 +00:00
parent 796493f582
commit ecc59dfee3
+6 -1
View File
@@ -65,7 +65,12 @@ public abstract class TestBase {
@Before
public void dbInit() throws Exception {
String configFileName = System.getProperty("user.home") + "/.pokerth/config.xml";
String configFileName = System.getProperty("user.home");
if (System.getProperty("os.name").toLowerCase().indexOf("linux") > -1) {
configFileName += "/.pokerth/config.xml";
} else {
configFileName += "/AppData/Roaming/pokerth/config.xml";
}
File file = new File(configFileName);
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db = dbf.newDocumentBuilder();