mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-10 23:07:59 +00:00
Do not display !.qB extension in save path
This commit is contained in:
parent
7ee9abd646
commit
5d1a584eac
@ -963,7 +963,7 @@ QTorrentHandle Bittorrent::addTorrent(QString path, bool fromScanDir, QString fr
|
|||||||
if(! torrentBackup.exists()) {
|
if(! torrentBackup.exists()) {
|
||||||
if(! torrentBackup.mkpath(torrentBackup.path())) {
|
if(! torrentBackup.mkpath(torrentBackup.path())) {
|
||||||
std::cerr << "Couldn't create the directory: '" << qPrintable(torrentBackup.path()) << "'\n";
|
std::cerr << "Couldn't create the directory: '" << qPrintable(torrentBackup.path()) << "'\n";
|
||||||
exit(1);
|
return h;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Processing torrents
|
// Processing torrents
|
||||||
|
@ -817,7 +817,7 @@ void PropertiesWidget::renameSelectedFile() {
|
|||||||
// Also rename it in the files list model
|
// Also rename it in the files list model
|
||||||
PropListModel->setData(PropListModel->index(0, 0), new_file_name);
|
PropListModel->setData(PropListModel->index(0, 0), new_file_name);
|
||||||
}
|
}
|
||||||
display_path = new_path;
|
display_path = h.firstFileSavePath();
|
||||||
} else {
|
} else {
|
||||||
display_path = savePath.absolutePath();
|
display_path = savePath.absolutePath();
|
||||||
}
|
}
|
||||||
|
@ -460,6 +460,9 @@ QString QTorrentHandle::firstFileSavePath() const {
|
|||||||
if(!fsave_path.endsWith("/"))
|
if(!fsave_path.endsWith("/"))
|
||||||
fsave_path += "/";
|
fsave_path += "/";
|
||||||
fsave_path += misc::toQStringU(h.get_torrent_info().file_at(0).path.string());
|
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;
|
return fsave_path;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user