diff --git a/src/com/pms/service/PartMngService.java b/src/com/pms/service/PartMngService.java index 6d983d9..a607bb1 100644 --- a/src/com/pms/service/PartMngService.java +++ b/src/com/pms/service/PartMngService.java @@ -3212,7 +3212,8 @@ public class PartMngService extends BaseService { BufferedReader br = null; try { - File csvFile = new File(path + "\\" + fileName); + // OS에 관계없이 올바른 경로 생성 + File csvFile = new File(path, fileName); // 인코딩 자동 감지: UTF-8 → CP949 → EUC-KR 순서로 시도 String detectedEncoding = detectFileEncoding(csvFile); @@ -3589,8 +3590,9 @@ public class PartMngService extends BaseService { return resultList; } - // Excel 파일인 경우 - FileInputStream fis = new FileInputStream(path+"\\"+fileName); + // Excel 파일인 경우 - OS에 관계없이 올바른 경로 생성 + File excelFile = new File(path, fileName); + FileInputStream fis = new FileInputStream(excelFile); Workbook workBook = null; if (fileName.endsWith(".xls") || fileName.endsWith(".XLS")) {