Skip to content

Commit

Permalink
GH-461 - Fix user home replacement in files module on Windows.
Browse files Browse the repository at this point in the history
Use replace(…) instead of replaceAll(…) to avoid backslashes being dropped.
  • Loading branch information
Janosch-Kalich authored and odrotbohm committed Nov 25, 2024
1 parent 523fea9 commit 90e97c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/org/salespointframework/files/Workspace.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ private static Path getDefaultedPath(Path location) {
return !path.contains("${user.home}") //
? location //
: Path.of(location.toString()
.replaceAll("\\$\\{user\\.home\\}", System.getProperty("user.home")));
.replace("${user.home}", System.getProperty("user.home")));
}

/**
Expand Down

0 comments on commit 90e97c8

Please sign in to comment.