@@ -57,6 +57,7 @@ public class GetAzureStorageBlobCommand : StorageCloudBlobCmdletBase
5757 /// </summary>
5858 private const string SingleBlobVersionIDParameterSet = "SingleBlobVersionID" ;
5959
60+ [ CmdletParameterBreakingChange ( "Blob" , ChangeDescription = "Leading and trailing slashes will not be trimmed in a future release." ) ]
6061 [ Parameter ( Position = 0 , HelpMessage = "Blob name" , ParameterSetName = NameParameterSet ) ]
6162 [ Parameter ( Position = 0 , Mandatory = true , HelpMessage = "Blob name" , ParameterSetName = SingleBlobSnapshotTimeParameterSet ) ]
6263 [ Parameter ( Position = 0 , Mandatory = true , HelpMessage = "Blob name" , ParameterSetName = SingleBlobVersionIDParameterSet ) ]
@@ -329,6 +330,7 @@ internal async Task ListBlobsByPrefix(long taskId, IStorageBlobManagement localC
329330 {
330331 if ( blobFilter == null || blobFilter ( item . Name ) )
331332 {
333+ ClientOptions . TrimBlobNameSlashes = false ;
332334 OutputStream . WriteObject ( taskId , GetAzureStorageBlob ( item , track2container , localChannel . StorageContext , page . ContinuationToken , ClientOptions ) ) ;
333335 }
334336 realListCount ++ ;
@@ -387,7 +389,7 @@ internal async Task ListBlobsByPrefix(long taskId, IStorageBlobManagement localC
387389
388390 public static AzureStorageBlob GetAzureStorageBlob ( BlobItem blobItem , BlobContainerClient track2container , AzureStorageContext context , string continuationToken = null , BlobClientOptions options = null )
389391 {
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 ) ;
391393 AzureStorageBlob outputblob = new AzureStorageBlob ( blobClient , context , options , blobItem ) ;
392394 if ( ! string . IsNullOrEmpty ( continuationToken ) )
393395 {
0 commit comments