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

Name convention

This commit is contained in:
asfernandes 2009-09-22 15:36:21 +00:00
parent 4b3522374e
commit 3915cc3c15

View File

@ -31,7 +31,8 @@
using namespace Firebird; using namespace Firebird;
namespace { namespace
{
class DatabaseDirectoryList : public DirectoryList class DatabaseDirectoryList : public DirectoryList
{ {
private: private:
@ -89,18 +90,19 @@ bool ResolveDatabaseAlias(const PathName& alias, PathName& database)
} }
// If file_name has no path part, expand it in DatabasesPath // If file_name has no path part, expand it in DatabasesPath
Firebird::PathName Path, Name; Firebird::PathName path, name;
PathUtils::splitLastComponent(Path, Name, corrected_alias); PathUtils::splitLastComponent(path, name, corrected_alias);
// if path component not present in file_name // if path component not present in file_name
if (Path.length() == 0) if (path.isEmpty())
{ {
// try to expand to existing file // try to expand to existing file
if (databaseDirectoryList().expandFileName(database, Name)) if (databaseDirectoryList().expandFileName(database, name))
{ {
return true; return true;
} }
// try to use default path // try to use default path
if (databaseDirectoryList().defaultName(database, Name)) if (databaseDirectoryList().defaultName(database, name))
{ {
return true; return true;
} }