diff options
author | Christian Kamm <mail@ckamm.de> | 2019-03-29 11:36:45 +0300 |
---|---|---|
committer | Christian Kamm <mail@ckamm.de> | 2019-03-29 11:43:43 +0300 |
commit | 9c34e07d109becfcdc22a1fdbc6eca91cce0923d (patch) | |
tree | e2dce40a31f35e24aab915921448864e96119004 | |
parent | aca19c7a6dd005feb0f8ec909070cd63a1b9a8fb (diff) |
Vfs suffix: Require suffix when creating placeholder files
-rw-r--r-- | src/libsync/vfs/suffix/vfs_suffix.cpp | 5 |
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(" "); |