1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-10 14:57:52 +00:00

Do not display !.qB extension in save path

This commit is contained in:
Christophe Dumez 2010-07-25 14:00:35 +00:00
parent 7ee9abd646
commit 5d1a584eac
3 changed files with 5 additions and 2 deletions

View File

@ -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

View File

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

View File

@ -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;
}