From ab957a83fef1adbb242ba9a91966cbb14aa8dca4 Mon Sep 17 00:00:00 2001 From: Christian Marquez Grabia <4968250+chalmagr@users.noreply.github.com> Date: Tue, 20 Aug 2024 12:27:17 -0500 Subject: [PATCH] fix: Update TransferManagerUtils#createBlobName to only use the file name instead of the full file path (#2573) --- .../cloud/storage/transfermanager/TransferManagerUtils.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/google-cloud-storage/src/main/java/com/google/cloud/storage/transfermanager/TransferManagerUtils.java b/google-cloud-storage/src/main/java/com/google/cloud/storage/transfermanager/TransferManagerUtils.java index 607dd3148b..d70fc99b29 100644 --- a/google-cloud-storage/src/main/java/com/google/cloud/storage/transfermanager/TransferManagerUtils.java +++ b/google-cloud-storage/src/main/java/com/google/cloud/storage/transfermanager/TransferManagerUtils.java @@ -28,9 +28,9 @@ private TransferManagerUtils() {} static String createBlobName(ParallelUploadConfig config, Path file) { if (config.getPrefix().isEmpty()) { - return file.toString(); + return file.getFileName().toString(); } else { - return config.getPrefix().concat(file.toString()); + return config.getPrefix().concat(file.getFileName().toString()); } }