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()); } }