Skip to content

Commit b15d119

Browse files
committed
Fixing failing tests.
1 parent 3e56b97 commit b15d119

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/main/java/edu/ie3/datamodel/io/IoUtil.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,10 @@ public static String harmonizeFileSeparator(String in) {
3838
*/
3939
public static Path harmonizeFileSeparator(Path path) {
4040
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-
41+
in =
42+
IoUtil.FILE_SEPARATOR_REPLACEMENT.equals("\\\\")
43+
? in.replaceFirst("^" + IoUtil.FILE_SEPARATOR_REGEX, "")
44+
: in;
4645
return Path.of(IoUtil.harmonizeFileSeparator(in));
4746
}
4847

0 commit comments

Comments
 (0)