Skip to content

Commit cd7ba29

Browse files
SuperDubbojerrick-zhu
authored andcommitted
fix #2557 Update ConfigUtils.java (#2562)
1 parent 00b718c commit cd7ba29

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

dubbo-common/src/main/java/org/apache/dubbo/common/utils/ConfigUtils.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,8 @@ public static Properties loadProperties(String fileName, boolean allowMultiFile)
217217
*/
218218
public static Properties loadProperties(String fileName, boolean allowMultiFile, boolean optional) {
219219
Properties properties = new Properties();
220-
if (fileName.startsWith("/")) {
220+
// add scene judgement in windows environment Fix 2557
221+
if (fileName.startsWith("/") || fileName.matches("^[A-z]:\\\\\\S+$")) {
221222
try {
222223
FileInputStream input = new FileInputStream(fileName);
223224
try {
@@ -328,4 +329,4 @@ public static int getServerShutdownTimeout() {
328329
return timeout;
329330
}
330331

331-
}
332+
}

0 commit comments

Comments
 (0)