summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pullreqd.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/pullreqd.c b/pullreqd.c
index ae98078..00d72e9 100644
--- a/pullreqd.c
+++ b/pullreqd.c
@@ -162,6 +162,13 @@ int init_socket(config *cfg) {
int main_loop(config *cfg, int listen_socket, git_repository **repos) {
int done = 0;
+ struct stat st;
+
+ /* Does the PR root directory exist? */
+ if (stat(cfg->pr_root, &st) < 0) {
+ /* Create the PR root directory. */
+ mkdir(cfg->pr_root, 0755);
+ }
for (; !done;) {
break;