diff options
author | Matthieu Gallien <matthieu.gallien@nextcloud.com> | 2021-12-14 11:09:25 +0300 |
---|---|---|
committer | Matthieu Gallien <matthieu.gallien@nextcloud.com> | 2021-12-14 12:00:59 +0300 |
commit | 9a201a8963f4b94912b2ebb94093267ef6d92434 (patch) | |
tree | 9fe2e2e3840bf12c5d7d88379398e1052befd9d9 /src/libsync/discovery.cpp | |
parent | 5b696e5cf3e660c5f7425a387b74b03c23d6134e (diff) |
force download from server for local files that have invalid dates
will trigger if local state is incoherent
like the file itself haveing 0 or negative modtime and the database not
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
Diffstat (limited to 'src/libsync/discovery.cpp')
-rw-r--r-- | src/libsync/discovery.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libsync/discovery.cpp b/src/libsync/discovery.cpp index b673d4c98..605bb1a0b 100644 --- a/src/libsync/discovery.cpp +++ b/src/libsync/discovery.cpp @@ -953,6 +953,14 @@ void ProcessDirectoryJob::processFileAnalyzeLocalInfo( item->_modtime = localEntry.modtime; item->_type = localEntry.isDirectory ? ItemTypeDirectory : ItemTypeFile; _childModified = true; + } else if (dbEntry._modtime > 0 && localEntry.modtime <= 0) { + item->_instruction = CSYNC_INSTRUCTION_SYNC; + item->_direction = SyncFileItem::Down; + item->_size = localEntry.size > 0 ? localEntry.size : dbEntry._fileSize; + item->_modtime = dbEntry._modtime; + item->_previousModtime = dbEntry._modtime; + item->_type = localEntry.isDirectory ? ItemTypeDirectory : ItemTypeFile; + _childModified = true; } else { // Local file was changed item->_instruction = CSYNC_INSTRUCTION_SYNC; |