diff options
Diffstat (limited to 'external')
-rw-r--r-- | external/libcmis/UnpackedTarball_cmis.mk | 1 | ||||
-rw-r--r-- | external/libcmis/libcmis-sharepoint-repository-root.patch | 24 |
2 files changed, 25 insertions, 0 deletions
diff --git a/external/libcmis/UnpackedTarball_cmis.mk b/external/libcmis/UnpackedTarball_cmis.mk index b203f47f2b7f..039e361dd412 100644 --- a/external/libcmis/UnpackedTarball_cmis.mk +++ b/external/libcmis/UnpackedTarball_cmis.mk @@ -18,6 +18,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,cmis, \ external/libcmis/tdf90351.patch \ external/libcmis/http_auth.patch \ external/libcmis/libcmis-fix-google-drive.patch \ + external/libcmis/libcmis-sharepoint-repository-root.patch \ )) ifeq ($(OS)$(COM),WNTMSC) diff --git a/external/libcmis/libcmis-sharepoint-repository-root.patch b/external/libcmis/libcmis-sharepoint-repository-root.patch new file mode 100644 index 000000000000..f89b134cc7a4 --- /dev/null +++ b/external/libcmis/libcmis-sharepoint-repository-root.patch @@ -0,0 +1,24 @@ +diff --git a/src/libcmis/sharepoint-repository.cxx b/src/libcmis/sharepoint-repository.cxx +index 780624d..f992689 100644 +--- a/src/libcmis/sharepoint-repository.cxx ++++ b/src/libcmis/sharepoint-repository.cxx +@@ -35,7 +35,18 @@ SharePointRepository::SharePointRepository( std::string baseUrl ) : + m_description = "SharePoint repository"; + m_productName = "SharePoint"; + m_productVersion = "2010/2013"; +- m_rootId = baseUrl + "/getFolderByServerRelativeUrl('/')"; ++ // getFolderByServerRelativeUrl() API expects path to be ++ // *server-relative*, i.e. they must include site path. ++ // Given the baseUrl like "https://sp2013/sites/mysite/_api/Web" ++ // for a site "mysite" on sharepoint server "sp2013", ++ // the site root is '/sites/mysite/', not '/'. ++ // Trying to get folder '/' results in "Value does not fall ++ // within expected range" error. ++ // Preferrable here is to extract the root path from baseUrl, ++ // stripping server and api parts. But it can be unreliable ++ // if api part (_api/Web) is different for some server. ++ // On the other side, just querying empty path '' gives the root folder. ++ m_rootId = baseUrl + "/getFolderByServerRelativeUrl('')"; + + m_capabilities[ ACL ] = "discover"; + m_capabilities[ AllVersionsSearchable ] = "true"; |