Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@woboq.com>2018-09-24 11:06:32 +0300
committerOlivier Goffart <ogoffart@woboq.com>2018-09-24 11:06:32 +0300
commitbc760af7de6b7c3867330ed5501896ff391fe4af (patch)
tree45bf359caa1c24a601215991dd9d01acbc982b3a /test/syncenginetestutils.h
parent570ae67851c6dfa66596407bce1fd619ce113d77 (diff)
Fix ZSyncTest in Release
Q_ASSERT should not have side effects!
Diffstat (limited to 'test/syncenginetestutils.h')
-rw-r--r--test/syncenginetestutils.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/test/syncenginetestutils.h b/test/syncenginetestutils.h
index 1a78614b7..8edbb141f 100644
--- a/test/syncenginetestutils.h
+++ b/test/syncenginetestutils.h
@@ -893,7 +893,12 @@ public:
QString fileName = getFilePathFromUrl(QUrl::fromEncoded(request.rawHeader("Destination")));
Q_ASSERT(!fileName.isEmpty());
- Q_ASSERT((fileInfo = remoteRootFileInfo.find(fileName)));
+ fileInfo = remoteRootFileInfo.find(fileName);
+ Q_ASSERT(fileInfo);
+ if (!fileInfo) {
+ abort();
+ return;
+ }
QVERIFY(request.hasRawHeader("If")); // The client should put this header
if (request.rawHeader("If") != QByteArray("<" + request.rawHeader("Destination") + "> ([\"" + fileInfo->etag.toLatin1() + "\"])")) {
@@ -901,10 +906,6 @@ public:
return;
}
- if (!fileInfo) {
- abort();
- return;
- }
fileInfo->lastModified = OCC::Utility::qDateTimeFromTime_t(request.rawHeader("X-OC-Mtime").toLongLong());
remoteRootFileInfo.find(fileName, /*invalidate_etags=*/true);