mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 07:23:04 +01:00
Use symbolic name for current dir
This commit is contained in:
parent
086c479a4c
commit
8967b64c20
@ -746,7 +746,7 @@ bool ConfigFile::wildCards(const char* currentFileName, const PathName& pathPref
|
||||
// Any change in directory can cause config change
|
||||
PathName prefix(pathPrefix);
|
||||
if(!pathPrefix.hasData())
|
||||
prefix = ".";
|
||||
prefix = PathUtils::curr_dir_link;
|
||||
|
||||
bool found = false;
|
||||
PathName next(components.pop());
|
||||
@ -761,7 +761,7 @@ bool ConfigFile::wildCards(const char* currentFileName, const PathName& pathPref
|
||||
{
|
||||
PathName name;
|
||||
const PathName fileName = list.getFileName();
|
||||
if (fileName == ".")
|
||||
if (fileName == PathUtils::curr_dir_link)
|
||||
continue;
|
||||
if (fileName[0] == '.' && next[0] != '.')
|
||||
continue;
|
||||
|
@ -43,7 +43,7 @@ void ParsedPath::parse(const PathName& path)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (elem == ".") // Skip current dir reference
|
||||
if (elem == PathUtils::curr_dir_link) // Skip current dir reference
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@ -45,6 +45,9 @@ public:
|
||||
/// The directory separator for the platform.
|
||||
static const char dir_sep;
|
||||
|
||||
/// String used to point to current directory
|
||||
static const char* curr_dir_link;
|
||||
|
||||
/// String used to point to parent directory
|
||||
static const char* up_dir_link;
|
||||
|
||||
|
@ -35,6 +35,7 @@
|
||||
/// The POSIX implementation of the path_utils abstraction.
|
||||
|
||||
const char PathUtils::dir_sep = '/';
|
||||
const char* PathUtils::curr_dir_link = ".";
|
||||
const char* PathUtils::up_dir_link = "..";
|
||||
const char PathUtils::dir_list_sep = ':';
|
||||
|
||||
|
@ -7,6 +7,7 @@
|
||||
/// The Win32 implementation of the path_utils abstraction.
|
||||
|
||||
const char PathUtils::dir_sep = '\\';
|
||||
const char* PathUtils::curr_dir_link = ".";
|
||||
const char* PathUtils::up_dir_link = "..";
|
||||
const char PathUtils::dir_list_sep = ';';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user