diff options
author | Klaas Freitag <freitag@owncloud.com> | 2016-04-11 17:14:17 +0300 |
---|---|---|
committer | Klaas Freitag <freitag@owncloud.com> | 2016-04-11 17:14:17 +0300 |
commit | 6cb94e88492884854500d35012470147597e194b (patch) | |
tree | b82467b02bddcbf87f5ecfee385f52786fd8dc9e /src/libsync/owncloudpropagator.cpp | |
parent | bd3a079a7b5474a5260723ce055069aaa071d0c9 (diff) | |
parent | d433c24186c607e73c0493be1aef1a44d451092d (diff) |
Merge pull request #4656 from owncloud/close_journal_fix
Close journal fix - do not keep the journal open or reopen on error.
Diffstat (limited to 'src/libsync/owncloudpropagator.cpp')
-rw-r--r-- | src/libsync/owncloudpropagator.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/libsync/owncloudpropagator.cpp b/src/libsync/owncloudpropagator.cpp index bc1f125b9..04e592f9d 100644 --- a/src/libsync/owncloudpropagator.cpp +++ b/src/libsync/owncloudpropagator.cpp @@ -762,11 +762,13 @@ void CleanupPollsJob::start() auto info = _pollInfos.first(); _pollInfos.pop_front(); - SyncFileItemPtr item(new SyncFileItem( - _journal->getFileRecord(info._file).toSyncFileItem())); - PollJob *job = new PollJob(_account, info._url, item, _journal, _localPath, this); - connect(job, SIGNAL(finishedSignal()), SLOT(slotPollFinished())); - job->start(); + SyncJournalFileRecord record = _journal->getFileRecord(info._file); + SyncFileItemPtr item(new SyncFileItem(record.toSyncFileItem())); + if (record.isValid()) { + PollJob *job = new PollJob(_account, info._url, item, _journal, _localPath, this); + connect(job, SIGNAL(finishedSignal()), SLOT(slotPollFinished())); + job->start(); + } } void CleanupPollsJob::slotPollFinished() |