Skip to content

Commit 739b993

Browse files
authored
Merge pull request #35 from aafemt/CORE-5237
Postfix for #24 that fixes CORE-5271
2 parents f4a30f5 + 8830bfb commit 739b993

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
@@ -136,6 +136,12 @@ void PathUtils::concatPath(Firebird::PathName& result,
136136
const Firebird::PathName& first,
137137
const Firebird::PathName& second)
138138
{
139+
if (first.length() == 0)
140+
{
141+
result = second;
142+
return;
143+
}
144+
139145
result = first;
140146

141147
// 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)