Skip to content

Commit

Permalink
thanks, Heath
Browse files Browse the repository at this point in the history
  • Loading branch information
chlowell committed Dec 9, 2020
1 parent bc09ebc commit 9a6525e
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,14 @@ def parse_folder_url(folder_url):
parsed = urlparse(folder_url)

# the first segment of the path is the container name
container = parsed.path.strip("/").split("/")[0]
stripped_path = parsed.path.strip("/")
container = stripped_path.split("/")[0]

# N.B. this discards any SAS token in the URL.
# This is intentional--client methods require the SAS token as a separate parameter.
container_url = "{}://{}/{}".format(parsed.scheme, parsed.netloc, container)
# the rest of the path is the folder name
folder_name = stripped_path[len(container) + 1 :]

# the folder name is the rest of the path
folder_name = parsed.path[len(container) + 1 :].strip("/")
# this intentionally discards any SAS token in the URL--methods require the SAS token as a separate parameter
container_url = "{}://{}/{}".format(parsed.scheme, parsed.netloc, container)

return BackupLocation(container_url, folder_name)
except: # pylint:disable=broad-except
Expand Down

0 comments on commit 9a6525e

Please sign in to comment.