Skip to content

Commit 96c2bee

Browse files
committed
refactor(syncengine): use if init-statement for excludeFilePath
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
1 parent 5c5e55b commit 96c2bee

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libsync/syncengine.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -651,8 +651,8 @@ void SyncEngine::startSync()
651651
_discoveryPhase->_leadingAndTrailingSpacesFilesAllowed = _leadingAndTrailingSpacesFilesAllowed;
652652
_discoveryPhase->_account = _account;
653653
_discoveryPhase->_excludes = _excludedFiles.data();
654-
const QString excludeFilePath = _localPath + QStringLiteral(".sync-exclude.lst");
655-
if (FileSystem::fileExists(excludeFilePath)) {
654+
if (const QString excludeFilePath = _localPath + QStringLiteral(".sync-exclude.lst");
655+
FileSystem::fileExists(excludeFilePath)) {
656656
_discoveryPhase->_excludes->addExcludeFilePath(excludeFilePath);
657657
_discoveryPhase->_excludes->reloadExcludeFiles();
658658
}

0 commit comments

Comments
 (0)