fs/StandardDirectory: eliminate global variable "home_prefix"
This commit is contained in:
parent
ea5bcfed8b
commit
863a28daa3
@ -136,8 +136,6 @@ static AllocatedPath GetStandardDir(int folder_id)
|
|||||||
|
|
||||||
#ifdef USE_XDG
|
#ifdef USE_XDG
|
||||||
|
|
||||||
static constexpr std::string_view home_prefix = "$HOME/"sv;
|
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
ParseConfigLine(std::string_view line, std::string_view dir_name,
|
ParseConfigLine(std::string_view line, std::string_view dir_name,
|
||||||
AllocatedPath &result_dir)
|
AllocatedPath &result_dir)
|
||||||
@ -166,7 +164,7 @@ ParseConfigLine(std::string_view line, std::string_view dir_name,
|
|||||||
const bool quoted = SkipPrefix(line, "\""sv);
|
const bool quoted = SkipPrefix(line, "\""sv);
|
||||||
|
|
||||||
// check if path is relative to $HOME
|
// check if path is relative to $HOME
|
||||||
const bool home_relative = SkipPrefix(line, home_prefix);
|
const bool home_relative = SkipPrefix(line, "$HOME"sv);
|
||||||
|
|
||||||
// find end of the string
|
// find end of the string
|
||||||
std::string_view path_view;
|
std::string_view path_view;
|
||||||
|
Loading…
Reference in New Issue
Block a user