mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-15 01:33:07 -07:00
- Fixed a crash when save dir was an empty string, now defaulting to ~/qBT-dir/
This commit is contained in:
parent
e8adc74051
commit
eac0254744
1 changed files with 7 additions and 0 deletions
|
@ -504,6 +504,13 @@ float options_imp::getRatio() const{
|
|||
|
||||
// Return Save Path
|
||||
QString options_imp::getSavePath() const{
|
||||
QString home = QDir::homePath();
|
||||
if(home[home.length()-1] != QDir::separator()){
|
||||
home += QDir::separator();
|
||||
}
|
||||
if(txt_savePath->text().trimmed().isEmpty()){
|
||||
txt_savePath->setText(home+"qBT_dir");
|
||||
}
|
||||
return txt_savePath->text();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue