From ecc59dfee332b70c892a52c1fb21edb29f55e23b Mon Sep 17 00:00:00 2001 From: lotodore Date: Sun, 12 Jun 2011 18:41:48 +0000 Subject: [PATCH] Support running the test system on Windows 7. --- tests/src/pokerth_test/TestBase.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/src/pokerth_test/TestBase.java b/tests/src/pokerth_test/TestBase.java index 37e56284..5aa9213f 100644 --- a/tests/src/pokerth_test/TestBase.java +++ b/tests/src/pokerth_test/TestBase.java @@ -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();