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