Skip to content

Commit

Permalink
libsync: Add symlink type to DiscoveryPhase
Browse files Browse the repository at this point in the history
  • Loading branch information
taminob committed Nov 23, 2023
1 parent 8dd614d commit 4719069
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/libsync/discovery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,7 @@ void ProcessDirectoryJob::processFileAnalyzeRemoteInfo(const SyncFileItemPtr &it
_discoveryData->checkSelectiveSyncExistingFolder(path._server);
}

if (serverEntry.isDirectory != dbEntry.isDirectory()) {
if (serverEntry.isSymLink != dbEntry.isSymLink() || serverEntry.isDirectory != dbEntry.isDirectory()) {
// If the type of the entity changed, it's like NEW, but
// needs to delete the other entity first.
item->_instruction = CSYNC_INSTRUCTION_TYPE_CHANGE;
Expand Down
1 change: 1 addition & 0 deletions src/libsync/discoveryphase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,7 @@ static void propertyMapToRemoteInfo(const QMap<QString, QString> &map, RemoteInf
QString value = it.value();
if (property == QLatin1String("resourcetype")) {
result.isDirectory = value.contains(QLatin1String("collection"));
result.isSymLink = value.contains(QLatin1String("symlink"));
} else if (property == QLatin1String("getlastmodified")) {
const auto date = QDateTime::fromString(value, Qt::RFC2822Date);
Q_ASSERT(date.isValid());
Expand Down
1 change: 1 addition & 0 deletions src/libsync/discoveryphase.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ struct RemoteInfo
int64_t size = 0;
int64_t sizeOfFolder = 0;
bool isDirectory = false;
bool isSymLink = false;
bool _isE2eEncrypted = false;
bool isFileDropDetected = false;
QString e2eMangledName;
Expand Down

0 comments on commit 4719069

Please sign in to comment.