aboutsummaryrefslogtreecommitdiff
path: root/libplanfahr
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2014-04-14 11:02:47 +0200
committerGuido Günther <agx@sigxcpu.org>2014-04-14 11:04:46 +0200
commit077122801c2945092dc7499d48a4511d53cb6835 (patch)
tree688626c4c0f7142076b4bb4569d4949a24a9df0b /libplanfahr
parenta8fc0c54835b2e7bb64e0556437ebae59f134939 (diff)
Don't hardcode path separator
Diffstat (limited to 'libplanfahr')
-rw-r--r--libplanfahr/lpf-manager.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libplanfahr/lpf-manager.c b/libplanfahr/lpf-manager.c
index 8cd6a81..52c7287 100644
--- a/libplanfahr/lpf-manager.c
+++ b/libplanfahr/lpf-manager.c
@@ -69,7 +69,7 @@ static gchar *plugin_path(const char *name)
dir = g_strdup(g_getenv(LPF_PROVIDERS_ENV));
if (!dir)
dir = g_strdup(LPF_PROVIDERS_DIR);
- prefix = g_strjoin("/", dir, PROVIDER_LIBBASE, NULL);
+ prefix = g_build_path(G_DIR_SEPARATOR_S, dir, PROVIDER_LIBBASE, NULL);
ret = g_strjoin(NULL, prefix, name, ".", G_MODULE_SUFFIX, NULL);
g_free(dir);
@@ -96,7 +96,7 @@ GStrv lpf_manager_get_available_providers(void)
}
pattern = plugin_path("*");
- prefix_len = 1 + g_strrstr(pattern, "/") + strlen(PROVIDER_LIBBASE) - pattern ;
+ prefix_len = 1 + g_strrstr(pattern, G_DIR_SEPARATOR_S) + strlen(PROVIDER_LIBBASE) - pattern ;
LPF_DEBUG("Looking for providers in %s", pattern);
if (glob(pattern, GLOB_NOSORT, NULL, &globbuf))
goto out;