From 5a10f12751d64d1c75e006d39c9ca82e3063d8fd Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Mon, 7 Dec 2015 08:11:24 +0100 Subject: 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 --- src/libs/installer/packagemanagergui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libs/installer') diff --git a/src/libs/installer/packagemanagergui.cpp b/src/libs/installer/packagemanagergui.cpp index 3904d9fd6..2bbedb396 100644 --- a/src/libs/installer/packagemanagergui.cpp +++ b/src/libs/installer/packagemanagergui.cpp @@ -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 -- cgit v1.2.3