From: ritsute Date: Mon, 13 Jan 2020 11:25:28 +0000 (+0800) Subject: Handle broken shared file error gracefully X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~222^2^2~420 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=c92f5204239fdd0ad8f4a5a835eb61896a3bb4be;p=nextcloud-desktop.git Handle broken shared file error gracefully Signed-off-by: Brandon Signed-off-by: Brandon --- diff --git a/src/libsync/discoveryphase.cpp b/src/libsync/discoveryphase.cpp index a4432ad93..276751537 100644 --- a/src/libsync/discoveryphase.cpp +++ b/src/libsync/discoveryphase.cpp @@ -384,7 +384,14 @@ void DiscoverySingleDirectoryJob::directoryListingIteratedSlot(QString file, con propertyMapToFileStat(map, file_stat.get()); if (file_stat->type == ItemTypeDirectory) file_stat->size = 0; - if (file_stat->type == ItemTypeSkip + if (remotePerm.hasPermission(RemotePermissions::IsShared) && file_stat->etag.isEmpty()) { + /* Handle broken shared file error gracefully instead of stopping sync in the desktop client. + DO not set _error */ + qCWarning(lcDiscovery) + << "Missing path to a share :" << file << file_stat->path << file_stat->type << file_stat->size + << file_stat->modtime << file_stat->remotePerm.toString() + << file_stat->etag << file_stat->file_id; + } else if (file_stat->type == ItemTypeSkip || file_stat->size == -1 || file_stat->remotePerm.isNull() || file_stat->etag.isEmpty()