Skip to content

Commit 6609746

Browse files
authored
Merge pull request Azure#3913 from markcowl/stragenull
Add null check for storage context
2 parents 47c10ee + eac24c1 commit 6609746

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Storage/Commands.Storage/Blob/Cmdlet/StartAzureStorageBlobCopy.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ public override void ExecuteCmdlet()
285285
break;
286286

287287
case UriParameterSet:
288-
copyAction = () => StartCopyBlob(destChannel, AbsoluteUri, DestContainer, DestBlob, GetCmdletStorageContext(Context));
288+
copyAction = () => StartCopyBlob(destChannel, AbsoluteUri, DestContainer, DestBlob, (Context != null? GetCmdletStorageContext(Context) : null));
289289
target = AbsoluteUri;
290290
break;
291291

src/Storage/Commands.Storage/Blob/Cmdlet/StartAzureStorageBlobIncrementalCopy.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ public override void ExecuteCmdlet()
216216
break;
217217

218218
case UriParameterSet:
219-
copyAction = () => StartCopyBlob(destChannel, AbsoluteUri, DestContainer, DestBlob, new AzureStorageContext(Context.GetCloudStorageAccount()));
219+
copyAction = () => StartCopyBlob(destChannel, AbsoluteUri, DestContainer, DestBlob, (Context != null? GetCmdletStorageContext(Context): null));
220220
target = AbsoluteUri;
221221
break;
222222

0 commit comments

Comments
 (0)