src/main/java/com/lf/server/service/data/DataQueryService.java
@@ -52,7 +52,14 @@ AttachEntity ae = getAttachEntity(ue, tabName, eventid, fileName, md5, sizes); if (entity != null) { ae.setPath(entity.getPath()); String targetPath = pathHelper.getConfig().getUploadPath() + File.separator + ae.getPath(); File f = new File(targetPath); if (!f.exists() || f.isDirectory()) { newFile.renameTo(new File(targetPath)); } else { newFile.delete(); } }else { String targetPath = pathHelper.getConfig().getUploadPath() + File.separator + ae.getPath(); newFile.renameTo(new File(targetPath));