Index: ssts-basedata/src/main/java/com/forgon/disinfectsystem/filemanager/FtpFileManagerImpl.java =================================================================== diff -u -r30430 -r30431 --- ssts-basedata/src/main/java/com/forgon/disinfectsystem/filemanager/FtpFileManagerImpl.java (.../FtpFileManagerImpl.java) (revision 30430) +++ ssts-basedata/src/main/java/com/forgon/disinfectsystem/filemanager/FtpFileManagerImpl.java (.../FtpFileManagerImpl.java) (revision 30431) @@ -141,23 +141,21 @@ @Override public FTPFile[] getListFiles(FTPClient ftp, String path, FTPFileFilter filter, boolean showLogInfo, LoginUserData loginUserData){ FTPFile[] files = null; + String currentPath = null; try { if(showLogInfo){ - appLogManager.saveLog(loginUserData, Log.MODEL_DEVICE_INTERFACE, Log.TYPE_QUERY, String.format("尝试读取[%s]下的文件", getCurrentPath(ftp))); + currentPath = getCurrentPath(ftp); + appLogManager.saveLog(loginUserData, Log.MODEL_DEVICE_INTERFACE, Log.TYPE_QUERY, String.format("尝试读取[%s]下的文件", currentPath)); } ftp.setDataTimeout(40000); files = ftp.listFiles(path,filter); if(showLogInfo){ - appLogManager.saveLog(loginUserData, Log.MODEL_DEVICE_INTERFACE, Log.TYPE_QUERY, String.format("成功读取[%s]下的文件,文件数量[%s]", getCurrentPath(ftp),files.length)); + appLogManager.saveLog(loginUserData, Log.MODEL_DEVICE_INTERFACE, Log.TYPE_QUERY, String.format("成功读取[%s]下的文件,文件数量[%s]", currentPath,files.length)); } } catch (IOException e2) { e2.printStackTrace(); if(StringUtils.isBlank(path)){ - try { - throw new RuntimeException("查看"+ getCurrentPath(ftp) +"目录下的文件异常"+ e2.getMessage()); - } catch (IOException e) { - throw new RuntimeException(e.getMessage()); - } + throw new RuntimeException("查看"+ currentPath +"目录下的文件异常"+ e2.getMessage()); }else{ throw new RuntimeException("查看"+ path +"目录下的文件异常"+ e2.getMessage()); }