File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -59,14 +59,14 @@ def parse_folder_url(folder_url):
59
59
parsed = urlparse (folder_url )
60
60
61
61
# the first segment of the path is the container name
62
- container = parsed .path .strip ("/" ).split ("/" )[0 ]
62
+ stripped_path = parsed .path .strip ("/" )
63
+ container = stripped_path .split ("/" )[0 ]
63
64
64
- # N.B. this discards any SAS token in the URL.
65
- # This is intentional--client methods require the SAS token as a separate parameter.
66
- container_url = "{}://{}/{}" .format (parsed .scheme , parsed .netloc , container )
65
+ # the rest of the path is the folder name
66
+ folder_name = stripped_path [len (container ) + 1 :]
67
67
68
- # the folder name is the rest of the path
69
- folder_name = parsed . path [ len ( container ) + 1 :]. strip ( "/" )
68
+ # this intentionally discards any SAS token in the URL--methods require the SAS token as a separate parameter
69
+ container_url = "{}://{}/{}" . format ( parsed . scheme , parsed . netloc , container )
70
70
71
71
return BackupLocation (container_url , folder_name )
72
72
except : # pylint:disable=broad-except
You can’t perform that action at this time.
0 commit comments