diff options
author | Christian Kamm <mail@ckamm.de> | 2019-02-13 13:17:51 +0300 |
---|---|---|
committer | ckamm <mail@ckamm.de> | 2019-02-13 22:47:33 +0300 |
commit | fb6446b3e5d9ed921af257995194fa5147e2cd9a (patch) | |
tree | 8d67a03250108e6cbea629ccc60b0b51e5f40836 /test/testsyncengine.cpp | |
parent | 0ef85009fd4023699f7a879756545b256aabc637 (diff) |
Tests: Fix permission propagation check
It was using the wrong path to the conflict file.
Diffstat (limited to 'test/testsyncengine.cpp')
-rw-r--r-- | test/testsyncengine.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/test/testsyncengine.cpp b/test/testsyncengine.cpp index cc945d032..a33ff13ad 100644 --- a/test/testsyncengine.cpp +++ b/test/testsyncengine.cpp @@ -693,14 +693,9 @@ private slots: QCOMPARE(QFileInfo(fakeFolder.localPath() + "A/a1").permissions(), perm); QCOMPARE(QFileInfo(fakeFolder.localPath() + "A/a2").permissions(), perm); - // Currently the umask applies to conflict files - auto octmask = umask(0); - umask(octmask); - // Qt uses 0x1, 0x2, 0x4 for "other"; 0x10, 0x20, 0x40 for "group" etc - auto qtmask = (octmask & 07) + 0x10 * ((octmask & 070) >> 3) + 0x100 * ((octmask & 0700) >> 6); - auto maskedPerm = QFileDevice::Permission(perm & (~qtmask)); - auto conflictName = fakeFolder.syncJournal().conflictRecord("A/a2").path; - QCOMPARE(QFileInfo(fakeFolder.localPath() + conflictName).permissions(), maskedPerm); + auto conflictName = fakeFolder.syncJournal().conflictRecord(fakeFolder.syncJournal().conflictRecordPaths().first()).path; + QVERIFY(conflictName.contains("A/a2")); + QCOMPARE(QFileInfo(fakeFolder.localPath() + conflictName).permissions(), perm); } #endif }; |