From c33f803ad2771ca076981ad82e396c9c3e8deb36 Mon Sep 17 00:00:00 2001 From: James Moger Date: Mon, 7 Apr 2014 23:05:01 -0400 Subject: [PATCH] Ensure repositories folder is created before executing a write test --- src/main/java/com/gitblit/manager/RepositoryManager.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/com/gitblit/manager/RepositoryManager.java b/src/main/java/com/gitblit/manager/RepositoryManager.java index 839671c2..9741998f 100644 --- a/src/main/java/com/gitblit/manager/RepositoryManager.java +++ b/src/main/java/com/gitblit/manager/RepositoryManager.java @@ -1821,6 +1821,9 @@ public class RepositoryManager implements IRepositoryManager { protected void confirmWriteAccess() { if (runtimeManager.isServingRepositories()) { try { + if (!getRepositoriesFolder().exists()) { + getRepositoriesFolder().mkdirs(); + } File file = File.createTempFile(".test-", ".txt", getRepositoriesFolder()); file.delete(); } catch (Exception e) { -- 2.39.5