Skip to content

Commit 11c15f8

Browse files
committed
Add the second try to find library in format from Sync action
1 parent e639282 commit 11c15f8

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/client/client.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,8 @@ def _get_sharepoint_folder_id_from_path(self, library_drive_id, folder_path):
236236
def _get_sharepoint_library_id(self, library_name):
237237
libraries = self._get_sharepoint_document_libraries()
238238
library = next((lib for lib in libraries if lib['name'] == library_name), None)
239+
if library is None:
240+
library = next((lib for lib in libraries if lib['webUrl'].split("/")[-1] == library_name), None)
239241
if library is None:
240242
raise OneDriveClientException(f"Library '{library_name}' not found")
241243
return library['id']

0 commit comments

Comments
 (0)