只更新文件夹
This commit is contained in:
parent
e05170255f
commit
fd2092ed2d
@ -989,9 +989,9 @@ public class NodesServiceImpl extends ServiceImpl<NodesMapper, Nodes> implements
|
||||
LOGGER.info("开始更新表数据:{}", zipName);
|
||||
|
||||
//获取文件路径
|
||||
String path = storageSourceConfig.getValue() + decompressionPath; // 替换为实际路径
|
||||
Path destRootPath = Paths.get(storageSourceConfig.getValue(), decompressionPath, zipName);
|
||||
File targetZip = new File(String.valueOf(zipFilePath));
|
||||
File target = new File(String.valueOf(destRoot));
|
||||
File target = new File(String.valueOf(destRootPath));
|
||||
//删除临时文件ZIP
|
||||
deleteDirectory(targetZip);
|
||||
//删除临时文件
|
||||
@ -1227,9 +1227,9 @@ public class NodesServiceImpl extends ServiceImpl<NodesMapper, Nodes> implements
|
||||
File destDir = new File(target);
|
||||
|
||||
// 删除目标文件夹(确保完全覆盖)
|
||||
if (destDir.exists()) {
|
||||
FileUtils.deleteDirectory(destDir);
|
||||
}
|
||||
// if (destDir.exists()) {
|
||||
// FileUtils.deleteDirectory(destDir);
|
||||
// }
|
||||
|
||||
// 递归拷贝文件夹及内容
|
||||
FileUtils.copyDirectory(srcDir, destDir);
|
||||
|
Loading…
Reference in New Issue
Block a user