Merge pull request #1599 from kpkym/v5-dev

修复"多次替换home目录"错误
This commit is contained in:
Golden Looly 2021-05-26 11:23:53 +08:00 committed by GitHub
commit e18555fd47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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