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 <olivier@woboq.com>2017-01-20 18:03:50 +0300
committerMarkus Goetz <markus@woboq.com>2017-01-20 18:03:50 +0300
commitd6fdda8efab8897be3ebbbebb1487dfb412275d8 (patch)
tree1ce6a49d7eee2aac20f383aec6efc19b8fdccf89 /test/syncenginetestutils.h
parentfaedaa5e09d09ca332a03e599dc59371633cd811 (diff)
ChunkingNG: add '0' padding on the filename (#5476)
The server sorts the chunk by name alphabetically. So if we want to keep the chunk in order, we need to add a few '0' in front of the chunk name
Diffstat (limited to 'test/syncenginetestutils.h')
-rw-r--r--test/syncenginetestutils.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/syncenginetestutils.h b/test/syncenginetestutils.h
index 665dc2016..c59495243 100644
--- a/test/syncenginetestutils.h
+++ b/test/syncenginetestutils.h
@@ -589,9 +589,10 @@ public:
char payload = '*';
do {
- if (!sourceFolder->children.contains(QString::number(count)))
+ QString chunkName = QString::number(count).rightJustified(8, '0');
+ if (!sourceFolder->children.contains(chunkName))
break;
- auto &x = sourceFolder->children[QString::number(count)];
+ auto &x = sourceFolder->children[chunkName];
Q_ASSERT(!x.isDir);
Q_ASSERT(x.size > 0); // There should not be empty chunks
size += x.size;