Of course... Forgot the slashes in path. xD
This commit is contained in:
parent
597cc3d293
commit
8d2f97a87d
14
src/main.c
14
src/main.c
@ -348,17 +348,19 @@ int parse_argv(int argc, const char **argv, struct options *opts) {
|
|||||||
return 1;
|
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);
|
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);
|
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);
|
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);
|
free(config_dir);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user