From 87c8885479267b5998088219eff555ae3cb0fc3a Mon Sep 17 00:00:00 2001 From: dpfls0922 Date: Wed, 15 Jan 2025 09:20:00 +0900 Subject: [PATCH] =?UTF-8?q?[fix]=20=ED=8C=8C=EC=9D=BC=20=EC=A1=B0=ED=9A=8C?= =?UTF-8?q?=20=EC=98=A4=EB=A5=98=20=ED=95=B4=EA=B2=B0=20#181?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../classfit/example/classfit/common/util/DriveUtil.java | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/main/java/classfit/example/classfit/common/util/DriveUtil.java b/src/main/java/classfit/example/classfit/common/util/DriveUtil.java index e3ea9390..f3b95cdd 100644 --- a/src/main/java/classfit/example/classfit/common/util/DriveUtil.java +++ b/src/main/java/classfit/example/classfit/common/util/DriveUtil.java @@ -129,13 +129,6 @@ private static String formatFileSize(long sizeInBytes) { } private static String getFileNameWithoutPrefix(String objectKey) { - String fileNameWithoutPrefix = objectKey.replaceFirst("^personal/\\d+/|^shared/\\d+/", ""); - - int lastSlashIndex = fileNameWithoutPrefix.lastIndexOf("/"); - if (lastSlashIndex != -1) { - fileNameWithoutPrefix = fileNameWithoutPrefix.substring(lastSlashIndex + 1); - } - - return fileNameWithoutPrefix.trim(); + return objectKey.replaceFirst("^personal/\\d+/|^shared/\\d+/", ""); } }