mirror of
https://gitee.com/dromara/hutool.git
synced 2025-05-04 04:37:59 +08:00
fix test
This commit is contained in:
parent
31e8ef6306
commit
367d0d40b8
@ -1548,7 +1548,7 @@ public class FileUtil {
|
||||
// 去除file:前缀
|
||||
pathToUse = StrUtil.removePrefixIgnoreCase(pathToUse, URLUtil.FILE_URL_PREFIX);
|
||||
// 统一使用斜杠
|
||||
pathToUse = pathToUse.replaceAll("[/\\\\]{2,}", StrUtil.SLASH).trim();
|
||||
pathToUse = pathToUse.replaceAll("[/\\\\]+", StrUtil.SLASH).trim();
|
||||
//兼容Windows下的共享目录路径(原始路径如果以\\开头,则保留这种路径)
|
||||
if(path.startsWith("\\\\")){
|
||||
pathToUse = "\\" + pathToUse;
|
||||
|
Loading…
Reference in New Issue
Block a user