From 4e2b6f6e9f3d1db462409718defe553dfb73673a Mon Sep 17 00:00:00 2001 From: Jordan Lee Date: Sat, 10 Dec 2011 18:45:21 +0000 Subject: [PATCH] #4664 "Use completeBaseName() instead of baseName() in the 'New Torrent' dialog" -- patch contributed by cantabile --- qt/make-dialog.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qt/make-dialog.cc b/qt/make-dialog.cc index f718c8a69..7305a3cc7 100644 --- a/qt/make-dialog.cc +++ b/qt/make-dialog.cc @@ -82,7 +82,7 @@ MakeDialog :: onProgress( ) // progress label const QString top = QString::fromLocal8Bit( myBuilder->top ); - const QString base( QFileInfo(top).baseName() ); + const QString base( QFileInfo(top).completeBaseName() ); QString str; if( !b->isDone ) str = tr( "Creating \"%1\"" ).arg( base ); @@ -148,7 +148,7 @@ MakeDialog :: makeTorrent( ) // the file to create const QString path = QString::fromLocal8Bit( myBuilder->top ); - const QString torrentName = QFileInfo(path).baseName() + QString::fromAscii(".torrent"); + const QString torrentName = QFileInfo(path).completeBaseName() + QString::fromAscii(".torrent"); myTarget = QDir( myDestination ).filePath( torrentName ); std::cerr << qPrintable(myTarget) << std::endl;