aboutsummaryrefslogtreecommitdiff
path: root/src/datastore/test_datastore_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/datastore/test_datastore_api.c')
-rw-r--r--src/datastore/test_datastore_api.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/datastore/test_datastore_api.c b/src/datastore/test_datastore_api.c
index 06abc0c0f7..2edc9a6ecb 100644
--- a/src/datastore/test_datastore_api.c
+++ b/src/datastore/test_datastore_api.c
@@ -678,13 +678,17 @@ int
main (int argc, char *argv[])
{
int ret;
- const char *pos;
+ char *pos;
char dir_name[128];
/* determine name of plugin to use */
plugin_name = argv[0];
while (NULL != (pos = strstr(plugin_name, "_")))
plugin_name = pos+1;
+ if (NULL != (pos = strstr(plugin_name, ".")))
+ pos[0] = 0;
+ else
+ pos = (char *) plugin_name;
GNUNET_snprintf (dir_name,
sizeof (dir_name),
@@ -699,6 +703,8 @@ main (int argc, char *argv[])
#endif
NULL);
ret = check ();
+ if (pos != plugin_name)
+ pos[0] = '.';
GNUNET_DISK_directory_remove (dir_name);
return ret;
}