mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-13 01:57:07 -07:00
Remove leading and trailing whitespace when choosing filenames. Fixes issue #401.
This commit is contained in:
parent
9b121fd5d0
commit
a2e4e2ad37
3 changed files with 3 additions and 3 deletions
|
@ -593,7 +593,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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue