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
|
||||
poor_mans_glob (std::string path)
|
||||
{
|
||||
std::string copy = path;
|
||||
replace_all (copy, "~", Glib::get_home_dir());
|
||||
return copy;
|
||||
if (path.find ('~') == 0) {
|
||||
path.replace (0, 1, Glib::get_home_dir());
|
||||
}
|
||||
return path;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user