From b2adbc1079c5e9dd00470419e60772dd582a30f2 Mon Sep 17 00:00:00 2001 From: kimilguk Date: Tue, 6 Jun 2023 13:20:57 +0900 Subject: [PATCH] =?UTF-8?q?=EC=BB=A4=EB=B0=8B2.=20=EC=9C=88=EB=8F=84?= =?UTF-8?q?=EC=9A=B0=20=EC=8B=9C=EC=8A=A4=ED=85=9C=EC=97=90=EC=84=9C?= =?UTF-8?q?=EB=8F=84=20=ED=8C=8C=EC=9D=BC=EC=8A=A4=ED=86=A0=EB=A6=AC?= =?UTF-8?q?=EC=A7=80=EC=9D=98=20=EA=B2=BD=EB=A1=9C=EB=A5=BC=20=EC=82=AC?= =?UTF-8?q?=EC=9A=A9=EA=B0=80=EB=8A=A5=ED=95=98=EA=B2=8C=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cloud/portalservice/utils/FileStorageUtils.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/backend/portal-service/src/main/java/org/egovframe/cloud/portalservice/utils/FileStorageUtils.java b/backend/portal-service/src/main/java/org/egovframe/cloud/portalservice/utils/FileStorageUtils.java index ad2c50e..fd3c695 100644 --- a/backend/portal-service/src/main/java/org/egovframe/cloud/portalservice/utils/FileStorageUtils.java +++ b/backend/portal-service/src/main/java/org/egovframe/cloud/portalservice/utils/FileStorageUtils.java @@ -51,10 +51,16 @@ public class FileStorageUtils implements StorageUtils { private final Path fileStorageLocation; private final Environment environment; private final MessageUtil messageUtil; - + private static final String FILE_SEPARATOR = File.separator; + public FileStorageUtils(Environment environment, MessageUtil messageUtil) { this.environment = environment; - this.fileStorageLocation = Paths.get(environment.getProperty("file.directory")).toAbsolutePath().normalize(); + String envFileDir = ""; + envFileDir = environment.getProperty("file.directory"); + if(FILE_SEPARATOR.equals("\\")) {//윈도우기반 자바시스템일 때 경로 에러방지 + envFileDir = envFileDir.replaceAll("/", "\\\\"); + } + this.fileStorageLocation = Paths.get(envFileDir).toAbsolutePath().normalize(); this.messageUtil = messageUtil; }