Qt: Also filter paths with double backslashes, because Windows

This commit is contained in:
Vicki Pfau 2025-07-30 22:25:50 -07:00
parent ea4eae0ada
commit 04f9748cc8
1 changed files with 1 additions and 1 deletions

View File

@ -566,7 +566,7 @@ void ReportView::addBinary(const QString& filename, const QByteArray& binary) {
}
QString ReportView::redact(const QString& text) {
static QRegularExpression home(R"((?:\b|^)[A-Z]:[\\/](?:Users|Documents and Settings)[\\/][^\\/]+|(?:/usr)?/home/[^/]+)",
static QRegularExpression home(R"((?:\b|^)[A-Z]:(?:/|\\\\?)(?:Users|Documents and Settings)(?:/|\\\\?)[^\\/]+|(?:/usr)?/home/[^/]+)",
QRegularExpression::MultilineOption | QRegularExpression::CaseInsensitiveOption);
QString redacted = text;
redacted.replace(home, QString("[Home directory]"));