summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCédric Bosdonnat <cedric.bosdonnat@free.fr>2012-07-02 14:57:43 +0200
committerCédric Bosdonnat <cedric.bosdonnat@free.fr>2012-07-02 14:57:43 +0200
commit2b6e9bd89a5f93e4352ef1cd0801310d9558343f (patch)
tree869f0f9c404ceb626f6f47aea05ec62641c9d4fd
parent514081036fb208b79818eb73cd17c10aa97ccb3e (diff)
libcmis: fixed unexpected exception thrown
Change-Id: Iaa42756f596333747a9100e075a2638b839175b3
-rw-r--r--libcmis/libcmis-0.2.3.patch34
-rw-r--r--libcmis/makefile.mk3
2 files changed, 37 insertions, 0 deletions
diff --git a/libcmis/libcmis-0.2.3.patch b/libcmis/libcmis-0.2.3.patch
new file mode 100644
index 000000000000..3b21e70db4af
--- /dev/null
+++ b/libcmis/libcmis-0.2.3.patch
@@ -0,0 +1,34 @@
+diff -ru libcmis-0.2.3/src/libcmis/atom-document.cxx misc/build/libcmis-0.2.3/src/libcmis/atom-document.cxx
+--- libcmis-0.2.3/src/libcmis/atom-document.cxx 2012-07-02 14:39:04.815222889 +0200
++++ misc/build/libcmis-0.2.3/src/libcmis/atom-document.cxx 2012-07-02 14:41:09.088229625 +0200
+@@ -129,15 +129,22 @@
+ vector< string > AtomDocument::getPaths( )
+ {
+ vector< string > paths;
+- vector< libcmis::FolderPtr > parents = getParents( );
+- for ( vector< libcmis::FolderPtr >::iterator it = parents.begin( );
+- it != parents.end(); ++it )
++ try
+ {
+- string path = ( *it )->getPath( );
+- if ( path[path.size() - 1] != '/' )
+- path += "/";
+- path += getName( );
+- paths.push_back( path );
++ vector< libcmis::FolderPtr > parents = getParents( );
++ for ( vector< libcmis::FolderPtr >::iterator it = parents.begin( );
++ it != parents.end(); ++it )
++ {
++ string path = ( *it )->getPath( );
++ if ( path[path.size() - 1] != '/' )
++ path += "/";
++ path += getName( );
++ paths.push_back( path );
++ }
++ }
++ catch ( const libcmis::Exception& )
++ {
++ // We may not have the permission to get the parents
+ }
+ return paths;
+ }
diff --git a/libcmis/makefile.mk b/libcmis/makefile.mk
index 37e4f6b42fe0..cedddf93a62d 100644
--- a/libcmis/makefile.mk
+++ b/libcmis/makefile.mk
@@ -44,6 +44,9 @@ TARGET=cmis
TARFILE_NAME=libcmis-0.2.3
TARFILE_MD5=0d2dcdfbf28d6208751b33057f5361f0
+# Pushed upstream in both master and libcmis-0.2 branches
+PATCH_FILES+=libcmis-0.2.3.patch
+
.IF "$(OS)$(COM)" == "WNTMSC"
PATCH_FILES+=boost-win.patch
.ENDIF