diff options
author | Christian Kamm <mail@ckamm.de> | 2019-03-29 12:16:09 +0300 |
---|---|---|
committer | Christian Kamm <mail@ckamm.de> | 2019-04-09 11:10:41 +0300 |
commit | f7d4b29df93451e16969bd2167cd5f2c6c437269 (patch) | |
tree | 866a07bf121dfc3691e66c4f3ed7d55ab4c96084 /src/libsync/owncloudpropagator.cpp | |
parent | 31c699be26ea9f2529141232bbbfa80e05b2cd6d (diff) |
PropagateDirectory: Set initial dir mtime to server mtime #7119
It's still not synced in any way later.
Diffstat (limited to 'src/libsync/owncloudpropagator.cpp')
-rw-r--r-- | src/libsync/owncloudpropagator.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libsync/owncloudpropagator.cpp b/src/libsync/owncloudpropagator.cpp index 6f5063ea2..f4ab0e9d4 100644 --- a/src/libsync/owncloudpropagator.cpp +++ b/src/libsync/owncloudpropagator.cpp @@ -974,6 +974,12 @@ void PropagateDirectory::slotSubJobsFinished(SyncFileItem::Status status) propagator()->_journal->deleteFileRecord(_item->_originalFile, true); } + if (_item->_instruction == CSYNC_INSTRUCTION_NEW && _item->_direction == SyncFileItem::Down) { + // special case for local MKDIR, set local directory mtime + // (it's not synced later at all, but can be nice to have it set initially) + FileSystem::setModTime(propagator()->getFilePath(_item->destination()), _item->_modtime); + } + // For new directories we always want to update the etag once // the directory has been propagated. Otherwise the directory // could appear locally without being added to the database. |