|
|
@ -394,7 +394,7 @@ void AddNewTorrentDialog::renameSelectedFile() |
|
|
|
bool ok; |
|
|
|
bool ok; |
|
|
|
const QString new_name_last = QInputDialog::getText(this, tr("Rename the file"), |
|
|
|
const QString new_name_last = QInputDialog::getText(this, tr("Rename the file"), |
|
|
|
tr("New name:"), QLineEdit::Normal, |
|
|
|
tr("New name:"), QLineEdit::Normal, |
|
|
|
index.data().toString(), &ok); |
|
|
|
index.data().toString(), &ok).trimmed(); |
|
|
|
if (ok && !new_name_last.isEmpty()) { |
|
|
|
if (ok && !new_name_last.isEmpty()) { |
|
|
|
if (!fsutils::isValidFileSystemName(new_name_last)) { |
|
|
|
if (!fsutils::isValidFileSystemName(new_name_last)) { |
|
|
|
QMessageBox::warning(this, tr("The file could not be renamed"), |
|
|
|
QMessageBox::warning(this, tr("The file could not be renamed"), |
|
|
|