Fix Google Drive checkout crash.

ID-based protocol don't have path.

Change-Id: I4f1dd4f77870d1c77bbd3cd015dd88396003ed6d
This commit is contained in:
Cao Cuong Ngo
2013-09-25 21:13:53 +02:00
parent e1f5178871
commit 781ae59664
2 changed files with 16 additions and 1 deletions

View File

@@ -13,7 +13,9 @@ $(eval $(call gb_UnpackedTarball_set_tarball,cmis,$(CMIS_TARBALL)))
$(eval $(call gb_UnpackedTarball_set_patchlevel,cmis,0)) $(eval $(call gb_UnpackedTarball_set_patchlevel,cmis,0))
$(eval $(call gb_UnpackedTarball_add_patches,cmis,libcmis/libcmis-0.4.1.patch)) $(eval $(call gb_UnpackedTarball_add_patches,cmis, \
libcmis/libcmis-0.4.1.patch \
libcmis/libcmis-0.4.1-empty-path.patch))
ifeq ($(OS)$(COM),WNTMSC) ifeq ($(OS)$(COM),WNTMSC)
$(eval $(call gb_UnpackedTarball_add_patches,cmis,libcmis/boost-win.patch)) $(eval $(call gb_UnpackedTarball_add_patches,cmis,libcmis/boost-win.patch))

View File

@@ -0,0 +1,13 @@
diff --git src/libcmis/document.cxx src/libcmis/document.cxx
index 1af0d63..7ecfd24 100644
--- src/libcmis/document.cxx
+++ src/libcmis/document.cxx
@@ -44,6 +44,8 @@ namespace libcmis
it != parents.end(); ++it )
{
string path = ( *it )->getPath( );
+ if ( path.empty() )
+ continue;
if ( path[path.size() - 1] != '/' )
path += "/";
path += getName( );