diff options
-rw-r--r-- | git.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -718,7 +718,7 @@ git_repo **init_git(config *cfg) { if (entry.d_type == DT_DIR) { /* Is the entry neither ".", nor ".."? */ if (strcmp(entry.d_name, ".") && strcmp(entry.d_name, "..")) { - char *repo_dir = calloc(strlen(cfg->git_root) + strlen(entry.d_name) + 2, sizeof(char)); + char *repo_dir = calloc(format_len("%s/%s", cfg->git_root, entry.d_name), sizeof(char)); /* Append the directory name to the git root. */ /* Could also do this: |