diff --git a/src/bittorrent.cpp b/src/bittorrent.cpp index ec3041561..358b75b46 100644 --- a/src/bittorrent.cpp +++ b/src/bittorrent.cpp @@ -963,7 +963,7 @@ QTorrentHandle Bittorrent::addTorrent(QString path, bool fromScanDir, QString fr if(! torrentBackup.exists()) { if(! torrentBackup.mkpath(torrentBackup.path())) { std::cerr << "Couldn't create the directory: '" << qPrintable(torrentBackup.path()) << "'\n"; - exit(1); + return h; } } // Processing torrents diff --git a/src/propertieswidget.cpp b/src/propertieswidget.cpp index 33df37761..880a6f4cb 100644 --- a/src/propertieswidget.cpp +++ b/src/propertieswidget.cpp @@ -817,7 +817,7 @@ void PropertiesWidget::renameSelectedFile() { // Also rename it in the files list model PropListModel->setData(PropListModel->index(0, 0), new_file_name); } - display_path = new_path; + display_path = h.firstFileSavePath(); } else { display_path = savePath.absolutePath(); } diff --git a/src/qtorrenthandle.cpp b/src/qtorrenthandle.cpp index 81522f694..62ee6bdab 100644 --- a/src/qtorrenthandle.cpp +++ b/src/qtorrenthandle.cpp @@ -460,6 +460,9 @@ QString QTorrentHandle::firstFileSavePath() const { if(!fsave_path.endsWith("/")) fsave_path += "/"; fsave_path += misc::toQStringU(h.get_torrent_info().file_at(0).path.string()); + // Remove .!qB extension + if(fsave_path.endsWith(".!qB", Qt::CaseInsensitive)) + fsave_path.chop(4); return fsave_path; }