1
0
mirror of synced 2025-12-25 02:09:19 -05:00

bug(source-microsoft-sharepoint): edge case, when unable to match a uri (#59711)

This commit is contained in:
Aldo Gonzalez
2025-05-07 15:44:19 -06:00
committed by GitHub
parent fd4a24c7b5
commit 1542c0f116
4 changed files with 4 additions and 4 deletions

View File

@@ -426,8 +426,7 @@ class SourceMicrosoftSharePointStreamReader(AbstractFileBasedStreamReader):
@staticmethod
def _parse_file_path_from_uri(file_uri: str) -> str:
match = re.search(r"sharepoint\.com(?:/sites/[^/]+)?/Shared%20Documents(.*)", file_uri)
file_path = match.group(1)
return file_path
return match.group(1) if match else file_uri
def _get_headers(self) -> Dict[str, str]:
access_token = self.get_access_token()