Browse Source

ADD: MacCloud/S3: step-154: improve list buckets

rich2014 3 months ago
parent
commit
7d4a31c5a2
1 changed files with 6 additions and 3 deletions
  1. 6 3
      plugins/wfx/MacCloud/src/drivers/aws/us3client.pas

+ 6 - 3
plugins/wfx/MacCloud/src/drivers/aws/us3client.pas

@@ -706,11 +706,14 @@ begin
     cloudDriverResult.httpResult:= httpResult;
     cloudDriverResult.resultMessage:= httpResult.body;
 
-    if httpResult.resultCode = 200 then
+    if httpResult.resultCode = 200 then begin
       Result:= analyseListResult( httpResult.body );
-
-    S3ClientResultProcess( cloudDriverResult );
+    end else begin
+      TLogUtil.logError( 'Error in TS3GetAllBucketsSession.listBuckets(): ' + cloudDriverResult.resultMessage );
+    end;
   finally
+    if Result = nil then
+      Result:= TS3Buckets.Create;
     FreeAndNil( cloudDriverResult );
     FreeAndNil( http );
   end;