From 8d2f97a87d418ef4f1ea83e8d6b210976c07be0b Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Sun, 31 Mar 2024 23:31:19 +0400 Subject: [PATCH] Of course... Forgot the slashes in path. xD --- src/main.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/main.c b/src/main.c index 5fe5ef9..dc1c508 100644 --- a/src/main.c +++ b/src/main.c @@ -348,17 +348,19 @@ int parse_argv(int argc, const char **argv, struct options *opts) { return 1; } - opts->addressbook_path = (char *)malloc(config_dir_len + 11 + 1); + opts->addressbook_path = (char *)malloc(config_dir_len + 12 + 1); strncpy(opts->addressbook_path, config_dir, config_dir_len); - strcat(opts->addressbook_path, "addressbook"); + strcat(opts->addressbook_path, "/addressbook"); - opts->key_pub_path = (char *)malloc(config_dir_len + 11 + 1); + opts->key_pub_path = (char *)malloc(config_dir_len + 12 + 1); strncpy(opts->key_pub_path, config_dir, config_dir_len); - strcat(opts->key_pub_path, "own_pub_key"); + strcat(opts->key_pub_path, "/own_pub_key"); - opts->key_sec_path = (char *)malloc(config_dir_len + 11 + 1); + opts->key_sec_path = (char *)malloc(config_dir_len + 12 + 1); strncpy(opts->key_sec_path, config_dir, config_dir_len); - strcat(opts->key_sec_path, "own_sec_key"); + strcat(opts->key_sec_path, "/own_sec_key"); + + printf("%s:%s:%s\n", opts->addressbook_path, opts->key_pub_path, opts->key_sec_path); free(config_dir);