Fix poor_mans_glob, ~' for
$HOME' is only valid at the start of a path
This commit is contained in:
parent
6f04296635
commit
c17fbd5abc
@ -39,8 +39,9 @@ replace_all (std::string& str,
|
|||||||
std::string
|
std::string
|
||||||
poor_mans_glob (std::string path)
|
poor_mans_glob (std::string path)
|
||||||
{
|
{
|
||||||
std::string copy = path;
|
if (path.find ('~') == 0) {
|
||||||
replace_all (copy, "~", Glib::get_home_dir());
|
path.replace (0, 1, Glib::get_home_dir());
|
||||||
return copy;
|
}
|
||||||
|
return path;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user