Prevent rescanning all dirs if no dir ID specified

This commit is contained in:
Martchus 2017-09-09 21:31:05 +02:00
parent 49862f2701
commit 144feb426c
1 changed files with 6 additions and 0 deletions

View File

@ -352,6 +352,12 @@ bool SyncthingConnection::resumeAllDirs()
*/
void SyncthingConnection::rescan(const QString &dirId, const QString &relpath)
{
if (dirId.isEmpty()) {
emit error(tr("Unable to rescan: No directory ID specified."), SyncthingErrorCategory::SpecificRequest, QNetworkReply::NoError,
QNetworkRequest(), QByteArray());
return;
}
QUrlQuery query;
query.addQueryItem(QStringLiteral("folder"), dirId);
if (!relpath.isEmpty()) {