We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3e56b97 commit b15d119Copy full SHA for b15d119
src/main/java/edu/ie3/datamodel/io/IoUtil.java
@@ -38,11 +38,10 @@ public static String harmonizeFileSeparator(String in) {
38
*/
39
public static Path harmonizeFileSeparator(Path path) {
40
String in = path.toString();
41
-
42
- if (in.length() > 0 && FILE_SEPARATOR_REGEX.contains(in.substring(0, 1))) {
43
- in = in.replaceFirst("^" + IoUtil.FILE_SEPARATOR_REGEX, "");
44
- }
45
+ in =
+ IoUtil.FILE_SEPARATOR_REPLACEMENT.equals("\\\\")
+ ? in.replaceFirst("^" + IoUtil.FILE_SEPARATOR_REGEX, "")
+ : in;
46
return Path.of(IoUtil.harmonizeFileSeparator(in));
47
}
48
0 commit comments