From 51910f2a44a1e7d4dfeaad9cd9cf696ff2453fda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=ED=95=9C=EA=B4=80=ED=9D=AC?= Date: Wed, 2 Oct 2024 01:29:47 +0900 Subject: [PATCH] =?UTF-8?q?refactor(File):=20=EC=9E=98=EB=AA=BB=EB=90=9C?= =?UTF-8?q?=20=ED=98=B8=EC=B6=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/stempo/api/global/util/FileUtil.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/stempo/api/global/util/FileUtil.java b/src/main/java/com/stempo/api/global/util/FileUtil.java index 42d69d5..62c9f13 100644 --- a/src/main/java/com/stempo/api/global/util/FileUtil.java +++ b/src/main/java/com/stempo/api/global/util/FileUtil.java @@ -129,7 +129,7 @@ public static void setFilePermissions(File file, String savePath, String baseDir if (os.contains("win")) { setReadOnlyPermissionsWindows(file, savePath, baseDirectory); } else { - FileUtil.setReadOnlyPermissionsUnix(savePath, baseDirectory); + setReadOnlyPermissionsUnix(savePath, baseDirectory); } } catch (Exception e) { throw new FilePermissionException("Failed to set file permissions: " + LogSanitizerUtil.sanitizeForLog(savePath)); @@ -144,7 +144,7 @@ public static void setFilePermissions(File file, String savePath, String baseDir * @throws FilePermissionException 파일 권한 설정에 실패한 경우 발생 */ public static void setReadOnlyPermissionsWindows(File file, String savePath, String baseDirectory) { - FileUtil.validateFilePath(file.getPath(), baseDirectory); + validateFilePath(file.getPath(), baseDirectory); if (!file.setReadOnly()) { throw new FilePermissionException("Failed to set file read-only: " + LogSanitizerUtil.sanitizeForLog(savePath)); } @@ -157,7 +157,7 @@ public static void setReadOnlyPermissionsWindows(File file, String savePath, Str * @throws IOException 권한 설정 실패 시 발생 */ public static void setReadOnlyPermissionsUnix(String filePath, String baseDirectory) throws IOException { - FileUtil.validateFilePath(filePath, baseDirectory); + validateFilePath(filePath, baseDirectory); Path path = Paths.get(filePath); // POSIX 파일 권한을 소유자에게만 읽기 권한을 부여하도록 설정