summaryrefslogtreecommitdiff
path: root/libcmis/libcmis-0.2.3.patch
blob: 3b21e70db4afa10454adc32d7c5b87a0e63840b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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;
 }