修复"多次替换home目录"错误

This commit is contained in:
kpkym 2021-05-26 09:51:46 +08:00
parent dca24eab36
commit e2083b6065

View File

@ -1423,7 +1423,7 @@ public class FileUtil extends PathUtil {
// 识别home目录形式并转换为绝对路径
if (pathToUse.startsWith("~")) {
pathToUse = pathToUse.replace("~", getUserHomePath());
pathToUse = pathToUse.replaceFirst("~", getUserHomePath());
}
// 统一使用斜杠