Skip to content

Commit

Permalink
Merge pull request #206 from ITA-OneByte/refactor/181
Browse files Browse the repository at this point in the history
[fix] 파일 조회 오류 해결 #181
  • Loading branch information
dpfls0922 authored Jan 15, 2025
2 parents 68e43ba + 87c8885 commit 6623424
Showing 1 changed file with 1 addition and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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+/", "");
}
}

0 comments on commit 6623424

Please sign in to comment.