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:
authorChristian Kamm <mail@ckamm.de>2019-03-29 11:36:45 +0300
committerChristian Kamm <mail@ckamm.de>2019-03-29 11:43:43 +0300
commit9c34e07d109becfcdc22a1fdbc6eca91cce0923d (patch)
treee2dce40a31f35e24aab915921448864e96119004
parentaca19c7a6dd005feb0f8ec909070cd63a1b9a8fb (diff)
Vfs suffix: Require suffix when creating placeholder files
-rw-r--r--src/libsync/vfs/suffix/vfs_suffix.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libsync/vfs/suffix/vfs_suffix.cpp b/src/libsync/vfs/suffix/vfs_suffix.cpp
index aac43ea81..9860c24b2 100644
--- a/src/libsync/vfs/suffix/vfs_suffix.cpp
+++ b/src/libsync/vfs/suffix/vfs_suffix.cpp
@@ -63,6 +63,11 @@ void VfsSuffix::createPlaceholder(const SyncFileItem &item)
{
// The concrete shape of the placeholder is also used in isDehydratedPlaceholder() below
QString fn = _setupParams.filesystemPath + item._file;
+ if (!fn.endsWith(fileSuffix())) {
+ ASSERT(false, "vfs file isn't ending with suffix");
+ return;
+ }
+
QFile file(fn);
file.open(QFile::ReadWrite | QFile::Truncate);
file.write(" ");