납품 폴더 조회 api 추가
This commit is contained in:
@@ -525,12 +525,13 @@ public class DatasetService {
|
||||
|
||||
// 존재 + 디렉토리 체크
|
||||
if (!dir.exists() || !dir.isDirectory()) {
|
||||
throw new RuntimeException("Invalid path");
|
||||
throw new CustomApiException("BAD_REQUEST", HttpStatus.BAD_REQUEST, "잘못된 경로입니다.");
|
||||
}
|
||||
|
||||
// 권한 없을때
|
||||
if (!dir.canRead()) {
|
||||
throw new RuntimeException("Permission denied");
|
||||
throw new CustomApiException(
|
||||
ApiResponseCode.FORBIDDEN.getId(), HttpStatus.FORBIDDEN, "디렉토리에 접근할 권한이 없습니다.");
|
||||
}
|
||||
|
||||
String canonicalPath = dir.getCanonicalPath();
|
||||
|
||||
Reference in New Issue
Block a user