forked from qt-creator/qt-creator
Utils: Fix FileChooser error marking for directories
Amends b84c8cf892
.
Change-Id: I108110cc682d331947c8eb47f62121ed02cd45f9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -582,7 +582,7 @@ bool PathChooser::validatePath(FancyLineEdit *edit, QString *errorMessage) const
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case PathChooser::Directory:
|
case PathChooser::Directory:
|
||||||
if (filePath.isDir()) {
|
if (filePath.exists() && !filePath.isDir()) {
|
||||||
if (errorMessage)
|
if (errorMessage)
|
||||||
*errorMessage = tr("The path \"%1\" is not a directory.").arg(filePath.toUserOutput());
|
*errorMessage = tr("The path \"%1\" is not a directory.").arg(filePath.toUserOutput());
|
||||||
return false;
|
return false;
|
||||||
|
Reference in New Issue
Block a user