@@ -57,6 +57,7 @@ public class GetAzureStorageBlobCommand : StorageCloudBlobCmdletBase
57
57
/// </summary>
58
58
private const string SingleBlobVersionIDParameterSet = "SingleBlobVersionID" ;
59
59
60
+ [ CmdletParameterBreakingChange ( "Blob" , ChangeDescription = "Leading and trailing slashes will not be trimmed in a future release." ) ]
60
61
[ Parameter ( Position = 0 , HelpMessage = "Blob name" , ParameterSetName = NameParameterSet ) ]
61
62
[ Parameter ( Position = 0 , Mandatory = true , HelpMessage = "Blob name" , ParameterSetName = SingleBlobSnapshotTimeParameterSet ) ]
62
63
[ Parameter ( Position = 0 , Mandatory = true , HelpMessage = "Blob name" , ParameterSetName = SingleBlobVersionIDParameterSet ) ]
@@ -329,6 +330,7 @@ internal async Task ListBlobsByPrefix(long taskId, IStorageBlobManagement localC
329
330
{
330
331
if ( blobFilter == null || blobFilter ( item . Name ) )
331
332
{
333
+ ClientOptions . TrimBlobNameSlashes = false ;
332
334
OutputStream . WriteObject ( taskId , GetAzureStorageBlob ( item , track2container , localChannel . StorageContext , page . ContinuationToken , ClientOptions ) ) ;
333
335
}
334
336
realListCount ++ ;
@@ -387,7 +389,7 @@ internal async Task ListBlobsByPrefix(long taskId, IStorageBlobManagement localC
387
389
388
390
public static AzureStorageBlob GetAzureStorageBlob ( BlobItem blobItem , BlobContainerClient track2container , AzureStorageContext context , string continuationToken = null , BlobClientOptions options = null )
389
391
{
390
- BlobBaseClient blobClient = Util . GetTrack2BlobClient ( track2container , blobItem . Name , context , blobItem . VersionId , blobItem . IsLatestVersion , blobItem . Snapshot , options , blobItem . Properties . BlobType ) ;
392
+ BlobBaseClient blobClient = Util . GetTrack2BlobClient ( track2container , blobItem . Name , context , blobItem . VersionId , blobItem . IsLatestVersion , blobItem . Snapshot , options , blobItem . Properties . BlobType , shouldTrimSlash : false ) ;
391
393
AzureStorageBlob outputblob = new AzureStorageBlob ( blobClient , context , options , blobItem ) ;
392
394
if ( ! string . IsNullOrEmpty ( continuationToken ) )
393
395
{
0 commit comments