MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / resolveDatabaseAccess

Function resolveDatabaseAccess

src/common/db_alias.cpp:439–457  ·  view source on GitHub ↗

Search for filenames, containing no path component, in dirs from DatabaseAccess list of firebird.conf. If not found try first entry in that list as default entry. Returns true if expanded successfully.

Source from the content-addressed store, hash-verified

437// of firebird.conf. If not found try first entry in that list as default entry.
438// Returns true if expanded successfully.
439static bool resolveDatabaseAccess(const PathName& alias, PathName& file)
440{
441 file = alias;
442
443 if (hasSeparator(alias))
444 return false;
445
446 // try to expand to existing file
447 if (!databaseDirectoryList().expandFileName(file, alias))
448 {
449 // try to use default path
450 if (!databaseDirectoryList().defaultName(file, alias))
451 {
452 return false;
453 }
454 }
455
456 return true;
457}
458
459// Set a prefix to a filename based on the ISC_PATH user variable.
460// Returns true if database name is expanded using ISC_PATH.

Callers 1

expandDatabaseNameFunction · 0.85

Calls 3

hasSeparatorFunction · 0.85
expandFileNameMethod · 0.80
defaultNameMethod · 0.80

Tested by

no test coverage detected