fix: handle potential empty hash

Co-authored-by: Chocobo1 <Chocobo1@users.noreply.github.com>
This commit is contained in:
ze0s 2025-01-19 14:02:48 +01:00 committed by GitHub
commit aae6244018
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1479,7 +1479,7 @@ void TorrentsController::setTagsAction()
{
requireParams({u"hashes"_s, u"tags"_s});
const QStringList hashes {params()[u"hashes"_s].split(u'|')};
const QStringList hashes {params()[u"hashes"_s].split(u'|', Qt::SkipEmptyParts)};
const QStringList tags {params()[u"tags"_s].split(u',', Qt::SkipEmptyParts)};
// Convert QStringList to TagSet