Compare commits
2 Commits
dfd4a42379
...
bf77725ef8
| Author | SHA1 | Date | |
|---|---|---|---|
| bf77725ef8 | |||
| dec0f26999 |
@@ -525,12 +525,13 @@ public class DatasetService {
|
|||||||
|
|
||||||
// 존재 + 디렉토리 체크
|
// 존재 + 디렉토리 체크
|
||||||
if (!dir.exists() || !dir.isDirectory()) {
|
if (!dir.exists() || !dir.isDirectory()) {
|
||||||
throw new RuntimeException("Invalid path");
|
throw new CustomApiException("BAD_REQUEST", HttpStatus.BAD_REQUEST, "잘못된 경로입니다.");
|
||||||
}
|
}
|
||||||
|
|
||||||
// 권한 없을때
|
// 권한 없을때
|
||||||
if (!dir.canRead()) {
|
if (!dir.canRead()) {
|
||||||
throw new RuntimeException("Permission denied");
|
throw new CustomApiException(
|
||||||
|
ApiResponseCode.FORBIDDEN.getId(), HttpStatus.FORBIDDEN, "디렉토리에 접근할 권한이 없습니다.");
|
||||||
}
|
}
|
||||||
|
|
||||||
String canonicalPath = dir.getCanonicalPath();
|
String canonicalPath = dir.getCanonicalPath();
|
||||||
|
|||||||
Reference in New Issue
Block a user