8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-22 18:43:02 +01:00

Merge pull request #7693 from FirebirdSQL/work/7692

Improvement #7692 : Make trace config parser resolve symlinks in database file path in trace configuration
This commit is contained in:
Vlad Khorsun 2023-08-04 11:52:18 +03:00 committed by GitHub
commit f4c22d3dc8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -28,6 +28,7 @@
#include "TraceConfiguration.h"
#include "../../common/SimilarToRegex.h"
#include "../../common/isc_f_proto.h"
#include "../../common/db_alias.h"
using namespace Firebird;
@ -125,9 +126,14 @@ void TraceCfgReader::readConfig()
{
PathName noQuotePattern = pattern.ToPathName();
noQuotePattern.alltrim(" '\'");
PathName expandedName;
if (m_databaseName == noQuotePattern)
if (m_databaseName == noQuotePattern ||
(expandDatabaseName(noQuotePattern, expandedName, nullptr),
m_databaseName == expandedName) )
{
match = exactMatch = true;
}
else
{
bool regExpOk = false;