diff --git a/src/main/java/net/snowflake/client/config/SFClientConfigParser.java b/src/main/java/net/snowflake/client/config/SFClientConfigParser.java index 2f3ee3b91..c2923af67 100644 --- a/src/main/java/net/snowflake/client/config/SFClientConfigParser.java +++ b/src/main/java/net/snowflake/client/config/SFClientConfigParser.java @@ -110,6 +110,8 @@ static String convertToWindowsPath(String filePath) { filePath = filePath.substring(1); } else if (filePath.startsWith("file:\\")) { filePath = filePath.substring(6); + } else if (filePath.startsWith("nested:\\")) { + filePath = filePath.substring(8); } else if (filePath.startsWith("\\")) { filePath = filePath.substring(2); } else if (matcher.find() && matcher.start() != 0) { diff --git a/src/test/java/net/snowflake/client/config/SFClientConfigParserTest.java b/src/test/java/net/snowflake/client/config/SFClientConfigParserTest.java index 225fff203..48a77625c 100644 --- a/src/test/java/net/snowflake/client/config/SFClientConfigParserTest.java +++ b/src/test/java/net/snowflake/client/config/SFClientConfigParserTest.java @@ -135,10 +135,10 @@ public void testgetConfigFileNameFromJDBCJarLocation() { } @Test - public void testconvertToWindowsPath() { + public void testConvertToWindowsPath() { String mockWindowsPath = "C:/Program Files/example.txt"; String resultWindowsPath = "C:\\Program Files\\example.txt"; - String[] testCases = new String[] {"", "file:\\", "\\\\", "/"}; + String[] testCases = new String[] {"", "file:\\", "\\\\", "/", "nested:\\"}; String mockCloudPrefix = "cloud://"; for (String testcase : testCases) {