diff --git a/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_file_client.hpp b/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_file_client.hpp index 5fdd22ea6..636c3d8aa 100644 --- a/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_file_client.hpp +++ b/sdk/storage/azure-storage-files-datalake/inc/azure/storage/files/datalake/datalake_file_client.hpp @@ -233,9 +233,10 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { explicit FileClient( Azure::Core::Http::Url dfsUri, Blobs::BlobClient blobClient, + Blobs::BlockBlobClient blockBlobClient, std::shared_ptr pipeline) : PathClient(std::move(dfsUri), std::move(blobClient), pipeline), - m_blockBlobClient(blobClient.GetBlockBlobClient()) + m_blockBlobClient(std::move(blockBlobClient)) { } friend class FileSystemClient; diff --git a/sdk/storage/azure-storage-files-datalake/src/datalake_directory_client.cpp b/sdk/storage/azure-storage-files-datalake/src/datalake_directory_client.cpp index 7bff89aea..48d03dd43 100644 --- a/sdk/storage/azure-storage-files-datalake/src/datalake_directory_client.cpp +++ b/sdk/storage/azure-storage-files-datalake/src/datalake_directory_client.cpp @@ -27,8 +27,8 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { { auto parsedConnectionString = Azure::Storage::Details::ParseConnectionString(connectionString); auto directoryUri = std::move(parsedConnectionString.DataLakeServiceUri); - directoryUri.AppendPath(fileSystemName, true); - directoryUri.AppendPath(path, true); + directoryUri.AppendPath(fileSystemName); + directoryUri.AppendPath(path); if (parsedConnectionString.KeyCredential) { @@ -125,18 +125,20 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { FileClient DirectoryClient::GetFileClient(const std::string& path) const { auto builder = m_dfsUri; - builder.AppendPath(path, true); + builder.AppendPath(path); auto blobClient = m_blobClient; - blobClient.m_blobUrl.AppendPath(path, true); - return FileClient(std::move(builder), std::move(blobClient), m_pipeline); + blobClient.m_blobUrl.AppendPath(path); + auto blockBlobClient = blobClient.GetBlockBlobClient(); + return FileClient( + std::move(builder), std::move(blobClient), std::move(blockBlobClient), m_pipeline); } DirectoryClient DirectoryClient::GetSubDirectoryClient(const std::string& path) const { auto builder = m_dfsUri; - builder.AppendPath(path, true); + builder.AppendPath(path); auto blobClient = m_blobClient; - blobClient.m_blobUrl.AppendPath(path, true); + blobClient.m_blobUrl.AppendPath(path); return DirectoryClient(std::move(builder), std::move(blobClient), m_pipeline); } diff --git a/sdk/storage/azure-storage-files-datalake/src/datalake_file_system_client.cpp b/sdk/storage/azure-storage-files-datalake/src/datalake_file_system_client.cpp index 306e74bd5..17e6ccaeb 100644 --- a/sdk/storage/azure-storage-files-datalake/src/datalake_file_system_client.cpp +++ b/sdk/storage/azure-storage-files-datalake/src/datalake_file_system_client.cpp @@ -42,7 +42,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { { auto parsedConnectionString = Azure::Storage::Details::ParseConnectionString(connectionString); auto fileSystemUri = std::move(parsedConnectionString.DataLakeServiceUri); - fileSystemUri.AppendPath(fileSystemName, true); + fileSystemUri.AppendPath(fileSystemName); if (parsedConnectionString.KeyCredential) { @@ -151,7 +151,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { PathClient FileSystemClient::GetPathClient(const std::string& path) const { auto builder = m_dfsUri; - builder.AppendPath(path, true); + builder.AppendPath(path); return PathClient(builder, m_blobContainerClient.GetBlobClient(path), m_pipeline); } @@ -159,14 +159,17 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { { auto builder = m_dfsUri; - builder.AppendPath(path, true); - return FileClient(builder, m_blobContainerClient.GetBlobClient(path), m_pipeline); + builder.AppendPath(path); + auto blobClient = m_blobContainerClient.GetBlobClient(path); + auto blockBlobClient = blobClient.GetBlockBlobClient(); + return FileClient( + std::move(builder), std::move(blobClient), std::move(blockBlobClient), m_pipeline); } DirectoryClient FileSystemClient::GetDirectoryClient(const std::string& path) const { auto builder = m_dfsUri; - builder.AppendPath(path, true); + builder.AppendPath(path); return DirectoryClient(builder, m_blobContainerClient.GetBlobClient(path), m_pipeline); } diff --git a/sdk/storage/azure-storage-files-datalake/src/datalake_path_client.cpp b/sdk/storage/azure-storage-files-datalake/src/datalake_path_client.cpp index 10b79fa24..a110e1c28 100644 --- a/sdk/storage/azure-storage-files-datalake/src/datalake_path_client.cpp +++ b/sdk/storage/azure-storage-files-datalake/src/datalake_path_client.cpp @@ -86,8 +86,8 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { { auto parsedConnectionString = Azure::Storage::Details::ParseConnectionString(connectionString); auto pathUri = std::move(parsedConnectionString.DataLakeServiceUri); - pathUri.AppendPath(fileSystemName, true); - pathUri.AppendPath(path, true); + pathUri.AppendPath(fileSystemName); + pathUri.AppendPath(path); if (parsedConnectionString.KeyCredential) { diff --git a/sdk/storage/azure-storage-files-datalake/src/datalake_service_client.cpp b/sdk/storage/azure-storage-files-datalake/src/datalake_service_client.cpp index c30809692..2d0083a65 100644 --- a/sdk/storage/azure-storage-files-datalake/src/datalake_service_client.cpp +++ b/sdk/storage/azure-storage-files-datalake/src/datalake_service_client.cpp @@ -155,7 +155,7 @@ namespace Azure { namespace Storage { namespace Files { namespace DataLake { FileSystemClient ServiceClient::GetFileSystemClient(const std::string& fileSystemName) const { auto builder = m_dfsUri; - builder.AppendPath(fileSystemName, true); + builder.AppendPath(fileSystemName); return FileSystemClient( builder, m_blobServiceClient.GetBlobContainerClient(fileSystemName), m_pipeline); } diff --git a/sdk/storage/azure-storage-files-shares/src/share_client.cpp b/sdk/storage/azure-storage-files-shares/src/share_client.cpp index d362c1bf6..ed5cb0ea6 100644 --- a/sdk/storage/azure-storage-files-shares/src/share_client.cpp +++ b/sdk/storage/azure-storage-files-shares/src/share_client.cpp @@ -23,7 +23,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { { auto parsedConnectionString = Azure::Storage::Details::ParseConnectionString(connectionString); auto shareUri = std::move(parsedConnectionString.FileServiceUri); - shareUri.AppendPath(shareName, true); + shareUri.AppendPath(shareName); if (parsedConnectionString.KeyCredential) { @@ -118,14 +118,14 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { DirectoryClient ShareClient::GetDirectoryClient(const std::string& directoryPath) const { auto builder = m_shareUri; - builder.AppendPath(directoryPath, true); + builder.AppendPath(directoryPath); return DirectoryClient(builder, m_pipeline); } FileClient ShareClient::GetFileClient(const std::string& filePath) const { auto builder = m_shareUri; - builder.AppendPath(filePath, true); + builder.AppendPath(filePath); return FileClient(builder, m_pipeline); } diff --git a/sdk/storage/azure-storage-files-shares/src/share_directory_client.cpp b/sdk/storage/azure-storage-files-shares/src/share_directory_client.cpp index c134af05d..b2a423ad5 100644 --- a/sdk/storage/azure-storage-files-shares/src/share_directory_client.cpp +++ b/sdk/storage/azure-storage-files-shares/src/share_directory_client.cpp @@ -23,8 +23,8 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { { auto parsedConnectionString = Azure::Storage::Details::ParseConnectionString(connectionString); auto directoryUri = std::move(parsedConnectionString.FileServiceUri); - directoryUri.AppendPath(shareName, true); - directoryUri.AppendPath(directoryPath, true); + directoryUri.AppendPath(shareName); + directoryUri.AppendPath(directoryPath); if (parsedConnectionString.KeyCredential) { @@ -121,14 +121,14 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { DirectoryClient DirectoryClient::GetSubDirectoryClient(const std::string& subDirectoryName) const { auto builder = m_shareDirectoryUri; - builder.AppendPath(subDirectoryName, true); + builder.AppendPath(subDirectoryName); return DirectoryClient(builder, m_pipeline); } FileClient DirectoryClient::GetFileClient(const std::string& filePath) const { auto builder = m_shareDirectoryUri; - builder.AppendPath(filePath, true); + builder.AppendPath(filePath); return FileClient(builder, m_pipeline); } diff --git a/sdk/storage/azure-storage-files-shares/src/share_file_client.cpp b/sdk/storage/azure-storage-files-shares/src/share_file_client.cpp index 1f2818cf8..69567a6e6 100644 --- a/sdk/storage/azure-storage-files-shares/src/share_file_client.cpp +++ b/sdk/storage/azure-storage-files-shares/src/share_file_client.cpp @@ -26,8 +26,8 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { { auto parsedConnectionString = Azure::Storage::Details::ParseConnectionString(connectionString); auto fileUri = std::move(parsedConnectionString.FileServiceUri); - fileUri.AppendPath(shareName, true); - fileUri.AppendPath(filePath, true); + fileUri.AppendPath(shareName); + fileUri.AppendPath(filePath); if (parsedConnectionString.KeyCredential) { diff --git a/sdk/storage/azure-storage-files-shares/src/share_service_client.cpp b/sdk/storage/azure-storage-files-shares/src/share_service_client.cpp index 135efd932..1b5ece17f 100644 --- a/sdk/storage/azure-storage-files-shares/src/share_service_client.cpp +++ b/sdk/storage/azure-storage-files-shares/src/share_service_client.cpp @@ -114,7 +114,7 @@ namespace Azure { namespace Storage { namespace Files { namespace Shares { ShareClient ServiceClient::GetShareClient(const std::string& shareName) const { auto builder = m_serviceUri; - builder.AppendPath(shareName, true); + builder.AppendPath(shareName); return ShareClient(builder, m_pipeline); }