SyncEngine: Ensure that the paths passed to the discovery ends with slashes

This was making the tx.pl test fail
This commit is contained in:
Olivier Goffart 2018-12-18 10:38:39 +01:00 committed by Kevin Ottens
parent edd806960d
commit fd410a5a84
No known key found for this signature in database
GPG key ID: 074BBBCB8DECC9E2

View file

@ -579,7 +579,11 @@ void SyncEngine::slotStartDiscovery()
_discoveryPhase->_excludes = _excludedFiles.data();
_discoveryPhase->_statedb = _journal;
_discoveryPhase->_localDir = _localPath;
if (!_discoveryPhase->_localDir.endsWith('/'))
_discoveryPhase->_localDir+='/';
_discoveryPhase->_remoteFolder = _remotePath;
if (!_discoveryPhase->_remoteFolder.endsWith('/'))
_discoveryPhase->_remoteFolder+='/';
_discoveryPhase->_syncOptions = _syncOptions;
_discoveryPhase->_shouldDiscoverLocaly = [this](const QString &s) { return shouldDiscoverLocally(s); };
_discoveryPhase->_selectiveSyncBlackList = selectiveSyncBlackList;