mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-22 08:27:24 -06:00
Remove leading and trailing whitespace when choosing filenames. Fixes issue #401.
This commit is contained in:
committed by
Christophe Dumez
parent
adc478a8dc
commit
2e6370084a
@@ -589,7 +589,7 @@ void TransferListWidget::askNewLabelForSelection() {
|
||||
bool invalid;
|
||||
do {
|
||||
invalid = false;
|
||||
const QString label = QInputDialog::getText(this, tr("New Label"), tr("Label:"), QLineEdit::Normal, "", &ok);
|
||||
const QString label = QInputDialog::getText(this, tr("New Label"), tr("Label:"), QLineEdit::Normal, "", &ok).trimmed();
|
||||
if (ok && !label.isEmpty()) {
|
||||
if (fsutils::isValidFileSystemName(label)) {
|
||||
setSelectionLabel(label);
|
||||
|
||||
Reference in New Issue
Block a user