mirror of https://github.com/mgba-emu/mgba.git
Qt: Also filter paths with double backslashes, because Windows
This commit is contained in:
parent
ea4eae0ada
commit
04f9748cc8
|
@ -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]"));
|
||||
|
|
Loading…
Reference in New Issue