Skip to content

Commit 915da47

Browse files
committed
[Azure] Some fixes
1 parent df0a642 commit 915da47

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

Quick.Azure.pas

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{ ***************************************************************************
22
3-
Copyright (c) 2015-2021 Kike Pérez
3+
Copyright (c) 2015-2023 Kike Pérez
44
55
Unit : Quick.Azure
66
Description : Azure blobs operations
77
Author : Kike Pérez
88
Version : 1.4
99
Created : 27/08/2015
10-
Modified : 21/10/2021
10+
Modified : 14/07/2023
1111
1212
This file is part of QuickLib: https://github.com/exilon/QuickLib
1313
@@ -607,9 +607,13 @@ function TQuickAzure.ListBlobs(const azContainer, azBlobsStartWith : string; Rec
607607
CloudResponseInfo := TCloudResponseInfo.Create;
608608
try
609609
previousMaker := cNextMarker;
610+
cNextMarker := '';
610611
azBlobList := BlobService.ListBlobs(azContainer,azBlobsStartWith,'/',previousMaker,100,[],cNextMarker,blobprefix,xmlresp,CloudResponseInfo);
611612
azResponseInfo := GetResponseInfo(CloudResponseInfo);
612-
if Assigned(azBlobList) then Result.Capacity := High(azBlobList);
613+
if Assigned(azBlobList) then
614+
begin
615+
if Result.Capacity < High(azBlobList) then Result.Capacity := High(azBlobList);
616+
end;
613617
//get folders (prefix)
614618
for folder in blobprefix do
615619
begin
@@ -636,6 +640,7 @@ function TQuickAzure.ListBlobs(const azContainer, azBlobsStartWith : string; Rec
636640
Result.Add(Blob);
637641
end;
638642
end;
643+
azBlobList := nil;
639644
finally
640645
CloudResponseInfo.Free;
641646
end;
@@ -692,6 +697,7 @@ function TQuickAzure.ListBlobs(const azContainer, azBlobsStartWith : string; Rec
692697
azBlobList.Free;
693698
end;
694699
end;
700+
azBlobList := nil;
695701
finally
696702
CloudResponseInfo.Free;
697703
end;

0 commit comments

Comments
 (0)