diff options
author | mrb0nk500 <b0nk@b0nk.xyz> | 2021-08-01 12:31:11 -0400 |
---|---|---|
committer | mrb0nk500 <b0nk@b0nk.xyz> | 2021-08-01 12:31:11 -0400 |
commit | dc1854a326b44ec82ce371cab672ea81f40d8a95 (patch) | |
tree | 9e306c5a3f889743bc7ec2bace1561a793d32d6a | |
parent | f1691aa750089a58cec474f04b78e3d1eda5429b (diff) |
Replace all instances of `dir_path_name()`, with
`sanitized_dir_path_name()` in `create_pull_request_dir()`.
-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) { |