@@ -138,22 +138,23 @@ The storage account must already exist.
138138* `verbose=0` verbosity flag passed to libcurl.
139139
140140# Notes
141- The container name can container "/"'s. If this is the case, then the string preceding the first "/" will
141+ The container name can contain "/"'s. If this is the case, then the string preceding the first "/" will
142142be the container name, and the string that remains will be pre-pended to the blob names. This allows Azure
143- to present blobs in a pseudo-directory structure.
143+ to present blobs in a pseudo-directory structure. Note that trailing and leading `/`'s are ignored.
144144"""
145145function AzContainer (containername:: AbstractString ; storageaccount, session= AzSession (;lazy= false , scope= __OAUTH_SCOPE), nthreads= Sys. CPU_THREADS, connect_timeout= 10 , read_timeout= 30 , nretry= 10 , verbose= 0 , prefix= " " )
146- name = split (containername, ' /' )
146+ name = split (strip ( containername, ' / ' ) , ' /' )
147147 _containername = name[1 ]
148- prefix *= lstrip (' /' * join (name[2 : end ], ' /' ), ' /' )
148+ prefix = strip (strip (prefix, ' /' )* ' /' * join (name[2 : end ], ' /' ), ' /' )
149+
149150 AzContainer (String (storageaccount), String (_containername), String (prefix), session, windows_one_thread (nthreads), connect_timeout, read_timeout, nretry, verbose)
150151end
151152
152153function AbstractStorage. Container (:: Type{<:AzContainer} , d:: Dict , session= AzSession (;lazy= false , scope= __OAUTH_SCOPE); nthreads= Sys. CPU_THREADS, connect_timeout= 10 , read_timeout= 30 , nretry= 10 , verbose= 0 )
153154 AzContainer (
154155 d[" storageaccount" ],
155- d[" containername" ],
156- d[" prefix" ],
156+ String ( strip ( d[" containername" ], ' / ' )) ,
157+ String ( strip ( d[" prefix" ], ' / ' )) ,
157158 session,
158159 windows_one_thread (get (d, " nthreads" , nthreads)),
159160 connect_timeout,
0 commit comments