mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +08:00
修复FileUtil.isAbsolutePath没有判断smb路径问题(pr#1299@Gitee)
This commit is contained in:
parent
7f91166016
commit
5c7c86897e
@ -2,7 +2,7 @@
|
|||||||
# 🚀Changelog
|
# 🚀Changelog
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------
|
||||||
# 5.8.36(2025-01-14)
|
# 5.8.36(2025-01-17)
|
||||||
|
|
||||||
### 🐣新特性
|
### 🐣新特性
|
||||||
* 【crypto 】 增加BCUtil.decodeECPrivateKey方法(issue#3829@Github)
|
* 【crypto 】 增加BCUtil.decodeECPrivateKey方法(issue#3829@Github)
|
||||||
@ -13,6 +13,7 @@
|
|||||||
### 🐞Bug修复
|
### 🐞Bug修复
|
||||||
* 【aop 】 修复ProxyUtil可能的空指针问题(issue#IBF20Z@Gitee)
|
* 【aop 】 修复ProxyUtil可能的空指针问题(issue#IBF20Z@Gitee)
|
||||||
* 【core 】 修复XmlUtil转义调用方法错误问题,修复XmlEscape未转义单引号问题(pr#3837@Github)
|
* 【core 】 修复XmlUtil转义调用方法错误问题,修复XmlEscape未转义单引号问题(pr#3837@Github)
|
||||||
|
* 【core 】 修复FileUtil.isAbsolutePath没有判断smb路径问题(pr#1299@Gitee)
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------
|
||||||
# 5.8.35(2024-12-25)
|
# 5.8.35(2024-12-25)
|
||||||
|
@ -57,26 +57,12 @@ public class FileUtilTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@Disabled
|
|
||||||
public void smbPathTest() {
|
public void smbPathTest() {
|
||||||
String smbPath = "\\\\192.168.254.88\\share\\rc-source";
|
final String smbPath = "\\\\192.168.1.1\\share\\rc-source";
|
||||||
String parseSmbPath = FileUtil.getAbsolutePath(smbPath);
|
final String parseSmbPath = FileUtil.getAbsolutePath(smbPath);
|
||||||
assertEquals(smbPath, parseSmbPath);
|
assertEquals(smbPath, parseSmbPath);
|
||||||
String dir = smbPath + "\\test";
|
assertTrue(FileUtil.isAbsolutePath(smbPath));
|
||||||
|
assertTrue(Paths.get(smbPath).isAbsolute());
|
||||||
FileUtil.mkdir(dir);
|
|
||||||
assertTrue(FileUtil.exist(dir));
|
|
||||||
String file = dir + "\\a.txt";
|
|
||||||
FileUtil.touch(file);
|
|
||||||
FileUtil.writeString("Hello SMB", file, "UTF-8");
|
|
||||||
|
|
||||||
String read = FileUtil.readString(file, "UTF-8");
|
|
||||||
assertEquals(read, "Hello SMB");
|
|
||||||
|
|
||||||
assertEquals(1, FileUtil.loopFiles(dir).size());
|
|
||||||
assertEquals(1, FileUtil.ls(dir).length);
|
|
||||||
|
|
||||||
FileUtil.del(dir);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
Loading…
x
Reference in New Issue
Block a user