From ff564c461b9927f3175af1f220d235c767f70da8 Mon Sep 17 00:00:00 2001 From: Jesper Schulz-Wedde Date: Tue, 27 Aug 2024 10:41:11 +0200 Subject: [PATCH] [24.x] Bugfix nextmarker in AFSFileClientImpl.Codeunit (#1408) (#1886) #### Summary Backport of #1408. #### Work Item(s) Fixes [AB#545984](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/545984) Co-authored-by: Pieter-Heine van der Meulen --- .../src/AFSFileClientImpl.Codeunit.al | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/System Application/App/Azure File Services API/src/AFSFileClientImpl.Codeunit.al b/src/System Application/App/Azure File Services API/src/AFSFileClientImpl.Codeunit.al index 6cc25dd8e6..4a1e00bd10 100644 --- a/src/System Application/App/Azure File Services API/src/AFSFileClientImpl.Codeunit.al +++ b/src/System Application/App/Azure File Services API/src/AFSFileClientImpl.Codeunit.al @@ -187,7 +187,7 @@ codeunit 8951 "AFS File Client Impl." AFSHelperLibrary.DirectoryContentNodeListToTempRecord(DirectoryURI, DirectoryPath, NodeList, PreserveDirectoryContent, AFSDirectoryContent); - if AFSOperationResponse.IsSuccessful() then begin + if AFSOperationResponse.IsSuccessful() and (AFSDirectoryContent."Entry No." <> 0) then begin AFSDirectoryContent."Next Marker" := CopyStr(AFSHelperLibrary.GetNextMarkerFromResponse(ResponseText), 1, MaxStrLen(AFSDirectoryContent."Next Marker")); AFSDirectoryContent.Modify(); end; @@ -217,7 +217,7 @@ codeunit 8951 "AFS File Client Impl." NodeList := AFSHelperLibrary.CreateHandleNodeListFromResponse(ResponseText); AFSHelperLibrary.HandleNodeListToTempRecord(NodeList, AFSHandle); - if AFSOperationResponse.IsSuccessful() then begin + if AFSOperationResponse.IsSuccessful() and (AFSHandle."Entry No." <> 0) then begin AFSHandle."Next Marker" := CopyStr(AFSHelperLibrary.GetNextMarkerFromResponse(ResponseText), 1, MaxStrLen(AFSHandle."Next Marker")); AFSHandle.Modify(); end; @@ -716,4 +716,4 @@ codeunit 8951 "AFS File Client Impl." local procedure OnPutFileRangesAfterPutOperation(ResponseIndex: Integer; var AFSOperationResponse: Codeunit "AFS Operation Response") begin end; -} \ No newline at end of file +}