BUGFIX: Add .torrent extension only when missing (torrent creator)

This commit is contained in:
Christophe Dumez
2010-09-25 10:49:13 +00:00
parent 05a6ffd554
commit 294095367a
2 changed files with 3 additions and 1 deletions

View File

@@ -191,7 +191,8 @@ void createtorrent::on_createButton_clicked(){
QString destination = QFileDialog::getSaveFileName(this, tr("Select destination torrent file"), last_path, tr("Torrent Files")+QString::fromUtf8(" (*.torrent)"));
if(!destination.isEmpty()) {
settings.setValue("CreateTorrent/last_save_path", misc::removeLastPathPart(destination));
destination += QString::fromUtf8(".torrent");
if(!destination.toUpper().endsWith(".TORRENT"))
destination += QString::fromUtf8(".torrent");
} else {
return;
}