Fix target directory check for reserved words on Windows

If the directory starts with "Con" etc then it is still ok to use, it is
only if it is /Con or /Con/ that it is not allowed. So the extra check to
be sure has anything after the reserved part is included.

Change-Id: I72e0e0f98167f29da54cb627e75cd1814c3f9706
Reviewed-by: Katja Marttila <katja.marttila@theqtcompany.com>
This commit is contained in:
Andy Shaw 2015-12-07 08:11:24 +01:00
parent eb574d77b0
commit 5a10f12751

View File

@ -2385,7 +2385,7 @@ QString TargetDirectoryPage::targetDirWarning() const
return tr("The installation path must not end with '.', please specify a valid folder.");
QString ambiguousChars = QLatin1String("[\"~<>|?*!@#$%^&:,; ]"
"|(\\\\CON)|(\\\\PRN)|(\\\\AUX)|(\\\\NUL)|(\\\\COM\\d)|(\\\\LPT\\d)");
"|(\\\\CON)(\\\\|$)|(\\\\PRN)(\\\\|$)|(\\\\AUX)(\\\\|$)|(\\\\NUL)(\\\\|$)|(\\\\COM\\d)(\\\\|$)|(\\\\LPT\\d)(\\\\|$)");
#else // Q_OS_WIN
QString ambiguousChars = QStringLiteral("[~<>|?*!@#$%^&:,; \\\\]");
#endif // Q_OS_WIN