diff options
Diffstat (limited to 'git.c')
-rw-r--r-- | git.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -302,7 +302,8 @@ int create_pull_request_dir(pull_request *pr, int id, const char *root) { } /* Get the path of the PR's directory. */ - pr_dir = (pr->title != NULL && pr->title[0] != '\0') ? dir_path_name(root, sanitize_str(pr->title)) : dir_path_num(root, id); + pr_dir = (pr->title != NULL && pr->title[0] != '\0') ? sanitized_dir_path_name(root, pr->title) : dir_path_num(root, id); + /* Is there no existing directory? */ if (stat(pr_dir, &st) < 0) { @@ -326,7 +327,9 @@ int create_pull_request_dir(pull_request *pr, int id, const char *root) { FILE *fp; /*char *filename = dir_path_name(root, sanitize_str(create_num_str(commits[i]->name, i)));*/ char *filename = create_num_str(commits[i]->name, i); - char *file = dir_path_name(root, sanitize_str(filename)); + char *file = sanitized_dir_path_name(root, filename); + + free(san_filename); /* Does this patch file exists? */ if (access(file, F_OK) == 0) { |