Fix: 파일 경로 구분자를 OS 독립적으로 수정 #67
@@ -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")) {
|
||||
|
||||
Reference in New Issue
Block a user