diff --git a/src/com/eactive/eai/inbound/FileEventListener.java b/src/com/eactive/eai/inbound/FileEventListener.java index cc2ee93..c076ae0 100644 --- a/src/com/eactive/eai/inbound/FileEventListener.java +++ b/src/com/eactive/eai/inbound/FileEventListener.java @@ -64,7 +64,7 @@ public class FileEventListener extends Process{ logger.info("[Send File Event] ※ Event 디렉토리 : [" + dirPath +"]"); logger.info("[Send File Event] ※ Event 파일명 : [" + fileName +"]"); // logger.info("[Send File Event] ========================================================================="); - if(dirPath.length() >= BatchDirUtil.getResponseRootDir().length()+11) {// 20251120 + if(dirPath.length() >= BatchDirUtil.getRequestRootDir().length()+10) {// 20251120 fileName = extractLastTwo(dirPath)[0]+"_"+extractLastTwo(dirPath)[1]+"_"+fileName; } logger.info("[Send File Event] ※ Event 수정 파일명 : [" + fileName +"]"); @@ -154,11 +154,13 @@ public class FileEventListener extends Process{ private void callFileMover() throws Exception { String renamedFileName = fileName; - if(dirPath.length() >= BatchDirUtil.getResponseRootDir().length()+11 && fileName.length() > 11) {// 20251120 + if(dirPath.length() >= BatchDirUtil.getRequestRootDir().length()+10 && fileName.length() > 11) {// 20251120 fileName = fileName.substring(11); renamedFileName = fileName + "_" + CalendarUtil.getCurrentTimeNoDash(); - }else { + }else if(fileName.length() > 11) { renamedFileName = fileName.substring(11) + "_" + CalendarUtil.getCurrentTimeNoDash(); + }else { + renamedFileName = fileName + "_" + CalendarUtil.getCurrentTimeNoDash(); } File realFile = new File(this.dirPath +"/"+ fileName);