SyncOptions: Add default placeholder suffix

Otherwise each test has to set this up anew.
This commit is contained in:
Christian Kamm 2018-01-29 11:16:50 +01:00 committed by Kevin Ottens
parent 12d6f680f2
commit 40f2303166
No known key found for this signature in database
GPG key ID: 074BBBCB8DECC9E2
2 changed files with 7 additions and 1 deletions

View file

@ -861,6 +861,12 @@ void SyncEngine::startSync()
_csync_ctx->new_files_are_placeholders = _syncOptions._newFilesArePlaceholders;
_csync_ctx->placeholder_suffix = _syncOptions._placeholderSuffix.toUtf8();
if (_csync_ctx->new_files_are_placeholders && _csync_ctx->placeholder_suffix.isEmpty()) {
csyncError(tr("Using placeholder files, but placeholder suffix is not set"));
finalize(false);
return;
}
// If needed, make sure we have up to date E2E information before the
// discovery phase, otherwise we start right away
if (_account->capabilities().clientSideEncryptionAvailable()) {

View file

@ -38,7 +38,7 @@ struct SyncOptions
/** Create a placeholder for new files instead of downloading */
bool _newFilesArePlaceholders = false;
QString _placeholderSuffix;
QString _placeholderSuffix = ".owncloud";
/** The initial un-adjusted chunk size in bytes for chunked uploads, both
* for old and new chunking algorithm, which classifies the item to be chunked