Vfs suffix: Require suffix when creating placeholder files

This commit is contained in:
Christian Kamm 2019-03-29 09:36:45 +01:00
parent aca19c7a6d
commit 9c34e07d10

View File

@ -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(" ");