mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-19 12:59:56 -07:00
Safer variable checking
This commit is contained in:
parent
faed0ba45a
commit
de3135c43b
1 changed files with 1 additions and 1 deletions
|
@ -749,7 +749,7 @@ void PropertiesWidget::renameSelectedFile() {
|
||||||
}else{
|
}else{
|
||||||
dir = QFileDialog::getExistingDirectory(this, tr("Choose save path"), QDir::homePath());
|
dir = QFileDialog::getExistingDirectory(this, tr("Choose save path"), QDir::homePath());
|
||||||
}
|
}
|
||||||
if(!dir.isNull()){
|
if(!dir.isEmpty()){
|
||||||
// Check if savePath exists
|
// Check if savePath exists
|
||||||
QDir savePath(misc::expandPath(dir));
|
QDir savePath(misc::expandPath(dir));
|
||||||
if(!savePath.exists()){
|
if(!savePath.exists()){
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue