mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-26 23:28:14 +03:00
force the initial sync even if the list is empty as this point
This commit is contained in:
parent
0aa5f51bb5
commit
58270990ed
2 changed files with 8 additions and 2 deletions
|
@ -42,7 +42,8 @@ FolderWatcher::FolderWatcher(const QString &root, QObject *parent)
|
|||
_eventInterval(DEFAULT_EVENT_INTERVAL_SEC),
|
||||
_root(root),
|
||||
_processTimer(new QTimer(this)),
|
||||
_lastMask(0)
|
||||
_lastMask(0),
|
||||
_initialSyncDone(false)
|
||||
{
|
||||
// this is not the best place for this
|
||||
addIgnore("/**/.unison*");
|
||||
|
@ -216,12 +217,13 @@ void FolderWatcher::slotINotifyEvent(int mask, int cookie, const QString &path)
|
|||
void FolderWatcher::slotProcessTimerTimeout()
|
||||
{
|
||||
qDebug() << "* Processing of event queue for" << root();
|
||||
if (!_pendingPaths.empty()) {
|
||||
if (!_pendingPaths.empty() || !_initialSyncDone) {
|
||||
QStringList notifyPaths(_pendingPaths);
|
||||
_pendingPaths.clear();
|
||||
//qDebug() << lastEventTime << eventTime;
|
||||
qDebug() << " * Notify" << notifyPaths.size() << "changed items for" << root();
|
||||
emit folderChanged(notifyPaths);
|
||||
_initialSyncDone = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -123,6 +123,10 @@ private:
|
|||
int _lastMask;
|
||||
QString _lastPath;
|
||||
QStringList _ignores;
|
||||
|
||||
// for the initial synchronization, without
|
||||
// any file changed
|
||||
bool _initialSyncDone;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue