mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-22 21:23:04 +01:00
Fixed case with empty path - thanks to Dmitry Kovalenko
This commit is contained in:
parent
7d7fea0288
commit
78c670f7e4
@ -121,7 +121,7 @@ void PathUtils::splitLastComponent(Firebird::PathName& path, Firebird::PathName&
|
||||
void PathUtils::splitPrefix(Firebird::PathName& path, Firebird::PathName& prefix)
|
||||
{
|
||||
prefix.erase();
|
||||
while (path[0] == dir_sep)
|
||||
while (path.hasData() && path[0] == dir_sep)
|
||||
{
|
||||
prefix = dir_sep;
|
||||
path.erase(0, 1);
|
||||
|
@ -167,7 +167,7 @@ void PathUtils::splitPrefix(Firebird::PathName& path, Firebird::PathName& prefix
|
||||
prefix = path.substr(0, 2);
|
||||
path.erase(0, 2);
|
||||
}
|
||||
if (path[0] == PathUtils::dir_sep || path[0] == '/')
|
||||
if (path.hasData() && (path[0] == PathUtils::dir_sep || path[0] == '/'))
|
||||
{
|
||||
prefix += path[0];
|
||||
path.erase(0, 1);
|
||||
|
Loading…
Reference in New Issue
Block a user