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

If path contains drive letter - it is definitely not relative path

This commit is contained in:
hvlad 2013-03-28 12:04:14 +00:00
parent 6fd54c9871
commit 623f0c392f

View File

@ -153,7 +153,10 @@ bool PathUtils::isRelative(const Firebird::PathName& path)
{ {
if (path.length() > 0) if (path.length() > 0)
{ {
char ds = hasDriveLetter(path) ? path[0] : path[2]; if (hasDriveLetter(path))
return false;
const char ds = path[0];
return ds != PathUtils::dir_sep && ds != '/'; return ds != PathUtils::dir_sep && ds != '/';
} }
return true; return true;