Skip to content

Commit dcaca1b

Browse files
committed
Postfix for FirebirdSQL#24 that fixes CORE-5271
1 parent 94c1f94 commit dcaca1b

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

src/common/os/posix/path_utils.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,12 @@ void PathUtils::concatPath(Firebird::PathName& result,
135135
const Firebird::PathName& first,
136136
const Firebird::PathName& second)
137137
{
138+
if (first.length() == 0)
139+
{
140+
result = second;
141+
return;
142+
}
143+
138144
result = first;
139145

140146
// First path used to be from trusted sources like getRootDirectory, etc.

src/common/os/win32/path_utils.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,12 @@ void PathUtils::concatPath(Firebird::PathName& result,
108108
const Firebird::PathName& first,
109109
const Firebird::PathName& second)
110110
{
111+
if (first.length() == 0)
112+
{
113+
result = second;
114+
return;
115+
}
116+
111117
result = first;
112118

113119
// First path used to be from trusted sources like getRootDirectory, etc.

0 commit comments

Comments
 (0)