mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-06-30 02:20:00 +03:00
GH-2050 fix cancel button in file browse dialogs filling text fields
This commit is contained in:
parent
95e6f37d39
commit
4bae6fe491
7 changed files with 19 additions and 22 deletions
|
|
@ -131,14 +131,14 @@ void JavaPage::on_javaDetectBtn_clicked()
|
|||
void JavaPage::on_javaBrowseBtn_clicked()
|
||||
{
|
||||
QString raw_path = QFileDialog::getOpenFileName(this, tr("Find Java executable"));
|
||||
QString cooked_path = FS::NormalizePath(raw_path);
|
||||
|
||||
// do not allow current dir - it's dirty. Do not allow dirs that don't exist
|
||||
if(cooked_path.isEmpty())
|
||||
if(raw_path.isEmpty())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
QString cooked_path = FS::NormalizePath(raw_path);
|
||||
QFileInfo javaInfo(cooked_path);;
|
||||
if(!javaInfo.exists() || !javaInfo.isExecutable())
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue