summaryrefslogtreecommitdiff
path: root/trust/token.c
diff options
context:
space:
mode:
authorStef Walter <stefw@redhat.com>2013-04-03 10:50:59 +0200
committerStef Walter <stefw@gnome.org>2013-04-03 12:45:43 +0200
commita63311a0f3f2669138d09ff8f618fd4d12fa0c3d (patch)
treed5a9b8cd32dda2e0e1eff1a8393b5dcb2174f86b /trust/token.c
parentc3f1b0a45eb1c28b6f025f8ae56c3b020801b6aa (diff)
downloadp11-kit-a63311a0f3f2669138d09ff8f618fd4d12fa0c3d.tar.gz
More compatible path munging and handling code
Centralize the path handling code, so we can remove unixy assumptions and have a chance of running on Windows. The current goal is to run all the tests on Windows. Includes some code from LRN <lrn1986@gmail.com> https://bugs.freedesktop.org/show_bug.cgi?id=63062
Diffstat (limited to 'trust/token.c')
-rw-r--r--trust/token.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/trust/token.c b/trust/token.c
index e7c91cd..f48f66b 100644
--- a/trust/token.c
+++ b/trust/token.c
@@ -44,6 +44,7 @@
#include "message.h"
#include "module.h"
#include "parser.h"
+#include "path.h"
#include "pkcs11.h"
#include "pkcs11x.h"
#include "token.h"
@@ -111,7 +112,7 @@ loader_load_directory (p11_token *token,
/* We're within a global mutex, so readdir is safe */
while ((dp = readdir (dir)) != NULL) {
- path = strconcat (directory, "/", dp->d_name, NULL);
+ path = p11_path_build (directory, dp->d_name, NULL);
return_val_if_fail (path != NULL, -1);
if (stat (path, &sb) < 0) {