Skip to content

Commit 4719069

Browse files
committed
libsync: Add symlink type to DiscoveryPhase
1 parent 8dd614d commit 4719069

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

src/libsync/discovery.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -711,7 +711,7 @@ void ProcessDirectoryJob::processFileAnalyzeRemoteInfo(const SyncFileItemPtr &it
711711
_discoveryData->checkSelectiveSyncExistingFolder(path._server);
712712
}
713713

714-
if (serverEntry.isDirectory != dbEntry.isDirectory()) {
714+
if (serverEntry.isSymLink != dbEntry.isSymLink() || serverEntry.isDirectory != dbEntry.isDirectory()) {
715715
// If the type of the entity changed, it's like NEW, but
716716
// needs to delete the other entity first.
717717
item->_instruction = CSYNC_INSTRUCTION_TYPE_CHANGE;

src/libsync/discoveryphase.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,7 @@ static void propertyMapToRemoteInfo(const QMap<QString, QString> &map, RemoteInf
442442
QString value = it.value();
443443
if (property == QLatin1String("resourcetype")) {
444444
result.isDirectory = value.contains(QLatin1String("collection"));
445+
result.isSymLink = value.contains(QLatin1String("symlink"));
445446
} else if (property == QLatin1String("getlastmodified")) {
446447
const auto date = QDateTime::fromString(value, Qt::RFC2822Date);
447448
Q_ASSERT(date.isValid());

src/libsync/discoveryphase.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ struct RemoteInfo
6868
int64_t size = 0;
6969
int64_t sizeOfFolder = 0;
7070
bool isDirectory = false;
71+
bool isSymLink = false;
7172
bool _isE2eEncrypted = false;
7273
bool isFileDropDetected = false;
7374
QString e2eMangledName;

0 commit comments

Comments
 (0)