aboutsummaryrefslogtreecommitdiffhomepage
path: root/path.cpp
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-02-07 22:44:10 -0800
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-02-07 22:44:10 -0800
commit8a2737566c57404a238bee8b14edff9f5ea334ed (patch)
treeb86f63be3690fd44b2e2706de88cd9b94f416f0f /path.cpp
parent006523ac59e42bc4ed2339ef31d2f6b41bdb190e (diff)
Excised some more halloc
Diffstat (limited to 'path.cpp')
-rw-r--r--path.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/path.cpp b/path.cpp
index a959f410..930f8563 100644
--- a/path.cpp
+++ b/path.cpp
@@ -252,6 +252,18 @@ wchar_t *path_get_path( const wchar_t *cmd )
return 0;
}
+bool path_get_path_string(const wcstring &cmd, wcstring &output)
+{
+ bool success = false;
+ wchar_t *tmp = path_get_path(cmd.c_str());
+ if (tmp) {
+ output = tmp;
+ free(tmp);
+ success = true;
+ }
+ return success;
+}
+
bool path_get_cdpath_string(const wcstring &dir_str, wcstring &result, const env_vars &vars)
{