summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-03-29 19:31:36 +0000
committerDavid Robillard <d@drobilla.net>2011-03-29 19:31:36 +0000
commit74807aabb3083e0750efcfb2ee37a7e3d50abb82 (patch)
treee0bfd8e75c6f3e29482c7ec2ae47ac57cb517ebf /src
parentf19aee968920e123fa2f2efc68af9e79b9df11f1 (diff)
downloadlilv-74807aabb3083e0750efcfb2ee37a7e3d50abb82.tar.gz
lilv-74807aabb3083e0750efcfb2ee37a7e3d50abb82.tar.bz2
lilv-74807aabb3083e0750efcfb2ee37a7e3d50abb82.zip
Tidy expand().
git-svn-id: http://svn.drobilla.net/lad/trunk/slv2@3134 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r--src/world.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/world.c b/src/world.c
index 5493cba..6d31cd7 100644
--- a/src/world.c
+++ b/src/world.c
@@ -493,14 +493,13 @@ slv2_world_load_bundle(SLV2World world, SLV2Value bundle_uri)
serd_node_free(&manifest_uri);
}
-// Expand POSIX things in path (particularly ~)
+/** Expand variables (e.g. POSIX ~ or $FOO, Windows %FOO%) in @a path. */
static char*
expand(const char* path)
{
#ifdef HAVE_WORDEXP
char* ret = NULL;
wordexp_t p;
-
wordexp(path, &p, 0);
if (p.we_wordc == 0) {
/* Literal directory path (e.g. no variables or ~) */
@@ -512,7 +511,6 @@ expand(const char* path)
/* Multiple expansions in a single directory path? */
SLV2_ERRORF("malformed path `%s' ignored\n", path);
}
-
wordfree(&p);
#elif defined(__WIN32__)
static const size_t len = 32767;