Utils: Fix PathChooser validation

Change-Id: I5b0ad8a1011f51c5db732fe454c409812b406c17
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Marcus Tillmanns
2023-04-04 09:50:02 +02:00
parent 27fbe0c51d
commit a374dd8bfe

View File

@@ -613,7 +613,7 @@ bool PathChooser::validatePath(FancyLineEdit *edit, QString *errorMessage) const
*errorMessage = Tr::tr("The path \"%1\" is not a directory.").arg(filePath.toUserOutput());
return false;
}
if (HostOsInfo::isWindowsHost() && !filePath.startsWithDriveLetter()
if (filePath.osType() == OsTypeWindows && !filePath.startsWithDriveLetter()
&& !filePath.startsWith("\\\\") && !filePath.startsWith("//")) {
if (errorMessage)
*errorMessage = Tr::tr("Invalid path \"%1\".").arg(filePath.toUserOutput());