Skip to content

Cannot copy blob from implicit root container #86

Description

@jcookems

Most of the blob APIs allow the the user to pass the empty string as the container name to indicate the implicit root container (as opposed to being explicit, using "$root").

However, that does not work for the source container's name when using the copyBlob API. Looking at the headers sent out, the problems is that the source is malformed with a double slash in the middle:

X-Ms-Copy-Source: /XXX//qa-214273-int-39

The problem in in BlobRestProxy.getCopyBlobSourceName, where source container is checked for null, but not empty. The fix is to change:

-    if (sourceContainer != null) {
+    if (sourceContainer != null && !sourceContainer.isEmpty()) {

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions