8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-24 07:23:03 +01:00
This commit is contained in:
asfernandes 2006-06-29 01:29:53 +00:00
parent 361037c552
commit f586ce8262

View File

@ -6194,14 +6194,16 @@ static bool set_path(const Firebird::PathName& file_name, Firebird::PathName& ex
// if the file already contains a remote node // if the file already contains a remote node
// or any path at all forget it // or any path at all forget it
for (const TEXT* p = file_name.c_str(); *p; p++) for (const TEXT* p = file_name.c_str(); *p; p++)
{
if (*p == ':' || *p == '/' || *p == '\\') if (*p == ':' || *p == '/' || *p == '\\')
return false; return false;
}
// concatenate the strings // concatenate the strings
expanded_name = pathname; expanded_name = pathname;
// CVC: Make the concatenation work if no slash is present. // CVC: Make the concatenation work if no slash is present.
char lastChar = expanded_name[expanded_name.length() - 1]; char lastChar = expanded_name[expanded_name.length() - 1];
if (lastChar != ':' && lastChar != '/' && lastChar != '\\') { if (lastChar != ':' && lastChar != '/' && lastChar != '\\') {
expanded_name.append("/"); expanded_name.append("/");