We changed the discovery code not to ignore files whose filename contains
charachter invalid on windows. (Because newer versions of the server
supports them)
Servers older than 8.1 will just say "Bad Request" as an error and it's a
regression against previous client version. So keep nice error even with
older server.
Relates to #3736
return;
}
+ if (_propagator->account()->serverVersionInt() < 0x080100) {
+ // Server version older than 8.1 don't support these character in filename.
+ static const QRegExp invalidCharRx("[\\\\:?*\"<>|]");
+ if (_item->_file.contains(invalidCharRx)) {
+ _item->_httpErrorCode = 400; // So the entry get blacklisted
+ done(SyncFileItem::NormalError, tr("File name contains at least one invalid character"));
+ return;
+ }
+ }
+
const QString filePath = _propagator->getFilePath(_item->_file);
// remember the modtime before checksumming to be able to detect a file