@ -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
@ -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();
@ -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;