Improve file tilde resolve

This commit is contained in:
crschnick committed 2026-10-07 15:48:09 +00:00
1 parent 8b4c4aaedd
commit e0a232a706
1 file changed
+2 -1
@@ -208,7 +208,8 @@ public final class FilePath {
}
public FilePath resolveTildeHome(FilePath dir) {
return value.startsWith("~") ? FilePath.of(value.replace("~", dir.toString())) : this;
var resolve = value.equals("~") || value.startsWith("~/") || value.startsWith("~\\");
return resolve ? FilePath.of(dir.toString() + value.substring(1)) : this;
}
public List<String> split() {