WebUI: Allow to remove the label assigned to a torrent

Empty strings are not valid label names, but they are used to remove
torrent labels, so allow them.
This commit is contained in:
Gabriele
2015-12-11 20:32:31 +01:00
committed by sledgehammer999
parent 23fdf3a0bc
commit 3b03bb286e

View File

@@ -724,7 +724,7 @@ void WebApplication::action_command_setLabel()
QStringList hashes = request().posts["hashes"].split("|"); QStringList hashes = request().posts["hashes"].split("|");
QString label = request().posts["label"].trimmed(); QString label = request().posts["label"].trimmed();
if (!Utils::Fs::isValidFileSystemName(label)) { if (!Utils::Fs::isValidFileSystemName(label) && !label.isEmpty()) {
status(400, "Labels must not contain special characters"); status(400, "Labels must not contain special characters");
return; return;
} }