ludc
2023-11-26 a27478da4ebab5fdfd5b4fcc25580212ed52cc28
代码提交
已修改1个文件
15 ■■■■■ 文件已修改
Source/UBCS/ubcs-ops/ubcs-log/src/main/java/com/vci/ubcs/log/service/impl/LogLocalServiceImpl.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS/ubcs-ops/ubcs-log/src/main/java/com/vci/ubcs/log/service/impl/LogLocalServiceImpl.java
@@ -225,7 +225,7 @@
            throw new ServerException("未获取到该日志路径!");
        }
        FileObjectBO fileObjectBO = new FileObjectBO();
        String logFullPaths = localLogVO.getLogFullPaths();
        String logFullPaths = this.convertWindows2Linux(localLogVO.getLogFullPaths());
        // 判断是否是父目录
        if(!localLogVO.getHasChildren()){
            //只下载一个日志文件
@@ -283,6 +283,19 @@
    }
    /**
     * 下载之前将windows的路径格式转换为linux
     * @param fullPath
     * @return
     */
    private String convertWindows2Linux(String fullPath){
        String os = System.getProperty("os.name").toLowerCase();
        if (!os.contains("win")) {
            fullPath = fullPath.replace("\\", "/");
        }
        return fullPath;
    }
    /**
     * 删除日志文件
     * @param localLogVO 文件全路径集合
     * @throws ServerException