summaryrefslogtreecommitdiff
path: root/libs/pbd/strreplace.cc
diff options
context:
space:
mode:
authorJohn Emmas <johne53@tiscali.co.uk>2015-03-09 18:29:26 +0000
committerJohn Emmas <johne53@tiscali.co.uk>2015-03-09 18:32:55 +0000
commit523f703b3bf0b05500ef8fc39b4d2aa33a3726c3 (patch)
tree66e6ff868197f2b8b4ee74cc4ea4b7c5207e8738 /libs/pbd/strreplace.cc
parente525b169f2879456e8f4c507633180ce63b26e28 (diff)
Move 'poor_mans_glob()' into libpbd
Diffstat (limited to 'libs/pbd/strreplace.cc')
-rw-r--r--libs/pbd/strreplace.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/libs/pbd/strreplace.cc b/libs/pbd/strreplace.cc
index 5d36608b3b..e043b9f54e 100644
--- a/libs/pbd/strreplace.cc
+++ b/libs/pbd/strreplace.cc
@@ -18,6 +18,7 @@
*/
#include "pbd/replace_all.h"
+#include "glibmm/miscutils.h"
int
replace_all (std::string& str,
@@ -36,3 +37,11 @@ replace_all (std::string& str,
return cnt;
}
+std::string
+poor_mans_glob (std::string path)
+{
+ std::string copy = path;
+ replace_all (copy, "~", Glib::get_home_dir());
+ return copy;
+}
+