From eb94c598920db14420f7873e53c3d5963907bd25 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Sat, 25 Sep 2010 10:46:29 +0000 Subject: [PATCH] TorrentCreator: add .torrent extension only when missing --- src/createtorrent_imp.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/createtorrent_imp.cpp b/src/createtorrent_imp.cpp index 4033f578f..4ed290632 100644 --- a/src/createtorrent_imp.cpp +++ b/src/createtorrent_imp.cpp @@ -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; }