diff options
| -rw-r--r-- | git.c | 7 | 
1 files changed, 4 insertions, 3 deletions
| @@ -256,15 +256,16 @@ int create_pull_request_dir(pull_request *pr, int id, const char *root) {  		log(LOG_ERR, "Negative ID, and either blank, or NULL Pull Request title.");  		return -1;  	} + +	/* 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); +  	/* Did we fail to create the info file? */  	if (!create_info_file(pr, pr_dir)) {  		log(LOG_ERR, "Failed to create info file.");  		return -1;  	} -	/* 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); -  	/* Is there no existing directory? */  	if (stat(pr_dir, &st) < -1) {  		/* Create a directory with a name of the stringified ID. */ | 
