From 97a809a74c60a38c46280b98bd2ec1c365643391 Mon Sep 17 00:00:00 2001 From: Christian Lohmaier Date: Mon, 14 Dec 2020 21:41:05 +0100 Subject: onedrive integration: updating metadata needs to be http PATCH avoids general i/o error message when adding newly created documents via the "Save remote" menu option. support for PATCH was added with 9cfcf83f53e0ae897b30705f790c6ebe0b86932e but only applied in onedrive-document.cxx OneDriveDocument::setContentStream which has it's own update of properties instead of reusing the method from onedrive-object.cxx Change-Id: I50f8801ac3186953f60198f877cedf3729307b89 --- external/libcmis/libcmis_onedrive.patch | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'external/libcmis') diff --git a/external/libcmis/libcmis_onedrive.patch b/external/libcmis/libcmis_onedrive.patch index 80634b16888d..60d7e7b3be69 100644 --- a/external/libcmis/libcmis_onedrive.patch +++ b/external/libcmis/libcmis_onedrive.patch @@ -256,7 +256,7 @@ index a9ae694..c1980c8 100644 vector< string > headers; string res; diff --git a/src/libcmis/onedrive-object.cxx b/src/libcmis/onedrive-object.cxx -index 976a97b..b6106a3 100644 +index 976a97b..8deb591 100644 --- a/src/libcmis/onedrive-object.cxx +++ b/src/libcmis/onedrive-object.cxx @@ -65,7 +65,7 @@ void OneDriveObject::initializeFromJson ( Json json, string /*id*/, string /*nam @@ -291,6 +291,15 @@ index 976a97b..b6106a3 100644 } string OneDriveObject::getUploadUrl( ) +@@ -152,7 +157,7 @@ libcmis::ObjectPtr OneDriveObject::updateProperties( + { + vector< string > headers; + headers.push_back( "Content-Type: application/json" ); +- response = getSession( )->httpPutRequest( getUrl( ), is, headers ); ++ response = getSession( )->httpPatchRequest( getUrl( ), is, headers ); + } + catch ( const CurlException& e ) + { diff --git a/src/libcmis/onedrive-repository.cxx b/src/libcmis/onedrive-repository.cxx index 3eaac9c..b01f5c2 100644 --- a/src/libcmis/onedrive-repository.cxx -- cgit v1.2.3