Skip to content

Commit

Permalink
Merge pull request #7693 from FirebirdSQL/work/7692
Browse files Browse the repository at this point in the history
Improvement #7692 : Make trace config parser resolve symlinks in database file path in trace configuration
  • Loading branch information
hvlad authored Aug 4, 2023
2 parents f628e52 + ab3d45b commit f4c22d3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/utilities/ntrace/TraceConfiguration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit f4c22d3

Please sign in to comment.