File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -2057,16 +2057,17 @@ def __contains__(self, key):
2057
2057
return False
2058
2058
2059
2059
def listdir (self , path = None ):
2060
+ from azure .storage .blob import Blob
2060
2061
dir_path = normalize_storage_path (self ._append_path_to_prefix (path ))
2061
2062
if dir_path :
2062
2063
dir_path += '/'
2063
2064
items = list ()
2064
2065
for blob in self .client .list_blobs (self .container , prefix = dir_path , delimiter = '/' ):
2065
- if '/' in blob .name [len (dir_path ):]:
2066
+ if type (blob ) == Blob :
2067
+ items .append (self ._strip_prefix_from_path (blob .name , dir_path ))
2068
+ else :
2066
2069
items .append (self ._strip_prefix_from_path (
2067
2070
blob .name [:blob .name .find ('/' , len (dir_path ))], dir_path ))
2068
- else :
2069
- items .append (self ._strip_prefix_from_path (blob .name , dir_path ))
2070
2071
return items
2071
2072
2072
2073
def rmdir (self , path = None ):
@@ -2077,7 +2078,7 @@ def rmdir(self, path=None):
2077
2078
self .client .delete_blob (self .container , blob .name )
2078
2079
2079
2080
def getsize (self , path = None ):
2080
- from azure .storage .blob . models import Blob
2081
+ from azure .storage .blob import Blob
2081
2082
store_path = normalize_storage_path (path )
2082
2083
fs_path = self .prefix
2083
2084
if store_path :
You can’t perform that action at this time.
0 commit comments