diff options
author | James Moger <james.moger@gitblit.com> | 2014-04-07 23:05:01 -0400 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2014-04-07 23:05:13 -0400 |
commit | c33f803ad2771ca076981ad82e396c9c3e8deb36 (patch) | |
tree | 0b1ffd382e4c8efcec89dd159259cb7e323ac649 /src/main/java/com/gitblit/manager/RepositoryManager.java | |
parent | 2bd0c5e34a254009fe034a9cec5324e55166c4c8 (diff) | |
download | gitblit-c33f803ad2771ca076981ad82e396c9c3e8deb36.tar.gz gitblit-c33f803ad2771ca076981ad82e396c9c3e8deb36.zip |
Ensure repositories folder is created before executing a write test
Diffstat (limited to 'src/main/java/com/gitblit/manager/RepositoryManager.java')
-rw-r--r-- | src/main/java/com/gitblit/manager/RepositoryManager.java | 3 |
1 files changed, 3 insertions, 0 deletions
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) { |