mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 06:44:57 +01:00
Fix poor_mans_glob, ~' for $HOME' is only valid at the start of a path
This commit is contained in:
parent
6f04296635
commit
c17fbd5abc
1 changed files with 4 additions and 3 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue