SocketAPI: use the canonical path

Issue #2591
This commit is contained in:
Olivier Goffart 2014-12-09 20:48:06 +01:00
parent 8b63a6f29b
commit a3e7f513e6

View file

@ -349,7 +349,12 @@ void SocketApi::broadcastMessage( const QString& verb, const QString& path, cons
}
if( !path.isEmpty() ) {
msg.append(QLatin1Char(':'));
msg.append(QDir::toNativeSeparators(path));
QFileInfo fi(path);
auto canon = fi.canonicalFilePath();
if (canon.isEmpty()) { // just in case the file do not exist
fi = fi.absoluteFilePath();
}
msg.append(QDir::toNativeSeparators(canon));
}
// sendMessage already has a debug output