mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-16 02:03:07 -07:00
Merge pull request #256 from sledgehammer999/fix_dir_separators
Fix dir separators
This commit is contained in:
commit
b97c6cadee
2 changed files with 2 additions and 7 deletions
|
@ -225,7 +225,7 @@ bool AddNewTorrentDialog::loadTorrent(const QString& torrent_path, const QString
|
||||||
QString single_file_relpath = misc::toQStringU(m_torrentInfo->file_at(0).path.string());
|
QString single_file_relpath = misc::toQStringU(m_torrentInfo->file_at(0).path.string());
|
||||||
#endif
|
#endif
|
||||||
for (int i=0; i<ui->save_path_combo->count()-1; ++i) {
|
for (int i=0; i<ui->save_path_combo->count()-1; ++i) {
|
||||||
ui->save_path_combo->setItemText(i, QDir(ui->save_path_combo->itemText(i)).absoluteFilePath(single_file_relpath));
|
ui->save_path_combo->setItemText(i, fsutils::toDisplayPath(QDir(ui->save_path_combo->itemText(i)).absoluteFilePath(single_file_relpath)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -73,12 +73,7 @@ using namespace libtorrent;
|
||||||
*/
|
*/
|
||||||
QString fsutils::toDisplayPath(const QString& path)
|
QString fsutils::toDisplayPath(const QString& path)
|
||||||
{
|
{
|
||||||
#if defined(Q_WS_WIN) || defined(Q_OS_OS2)
|
return QDir::toNativeSeparators(path);
|
||||||
QString ret = path;
|
|
||||||
return ret.replace("/", "\\");
|
|
||||||
#else
|
|
||||||
return path;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue