This commit is contained in:
ArsenArsen 2017-07-05 12:41:09 +02:00
parent 37be9946d6
commit 7d45d794a6
1 changed files with 3 additions and 3 deletions

View File

@ -29,12 +29,12 @@ WId PlatformBackend::getActiveWID() {
return (WId)GetForegroundWindow();
}
QString illegal(QStringLiteral("<>:\"/\|?*"));
QString illegal(QStringLiteral("<>:\"/\\|?*"));
QStringList illegalNames({ "CON", "PRN", "AUX", "NUL", "COM1", "COM2", "COM3", "COM4", "COM5", "COM6", "COM7",
"COM8", "COM9", "LPT1", "LPT2", "LPT3", "LPT4", "LPT5", "LPT6", "LPT7", "LPT8", "LPT9" });
bool PlatformBackend::filenamValid(QString name) {
unsigned int periods = 0;
bool PlatformBackend::filenameValid(QString name) {
int periods = 0;
for (QChar c : name) {
if (c == '.') periods++;
if (illegal.contains(c)) return false;