From: Olivier Goffart Date: Mon, 8 Feb 2016 11:07:34 +0000 (+0100) Subject: Discovery: don't ignore recall file #4420 X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~1254^2~20 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=6b643c7501be0802b82334d220c0f60a132f7770;p=nextcloud-desktop.git Discovery: don't ignore recall file #4420 The ".sys.admin#recall#" is the recall file and should not be ignored even if hidden. The remote discovery do not need to detect hidden files because it is already detected by csync in all cases. So this avoid code duplication --- diff --git a/csync/src/csync_update.c b/csync/src/csync_update.c index 90208d92a..618c296b9 100644 --- a/csync/src/csync_update.c +++ b/csync/src/csync_update.c @@ -820,7 +820,9 @@ int csync_ftw(CSYNC *ctx, const char *uri, csync_walker_fn fn, * local stat function. */ if( d_name[0] == '.' ) { - dirent->flags |= CSYNC_VIO_FILE_FLAGS_HIDDEN; + if (strcmp(".sys.admin#recall#", d_name) != 0) { /* recall file shall not be ignored (#4420) */ + dirent->flags |= CSYNC_VIO_FILE_FLAGS_HIDDEN; + } } if( res == 0) { diff --git a/src/libsync/discoveryphase.cpp b/src/libsync/discoveryphase.cpp index 9c73e07f2..dd0015843 100644 --- a/src/libsync/discoveryphase.cpp +++ b/src/libsync/discoveryphase.cpp @@ -325,9 +325,6 @@ void DiscoverySingleDirectoryJob::directoryListingIteratedSlot(QString file, con if( slashPos > -1 ) { fileRef = file.midRef(slashPos+1); } - if( fileRef.startsWith(QChar('.')) ) { - file_stat->flags = CSYNC_VIO_FILE_FLAGS_HIDDEN; - } //qDebug() << "!!!!" << file_stat << file_stat->name << file_stat->file_id << map.count(); _results.append(file_stat); }