Skip to content

Commit

Permalink
Update GitPathHandler.java
Browse files Browse the repository at this point in the history
  • Loading branch information
mcred committed Jun 10, 2024
1 parent 0fa5b9d commit 8f07e9b
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,11 @@ public ResourceAccessor getResourceAccessor(String root) throws IOException {
if (Boolean.TRUE.equals(cleanup)) {
this.registerShutdown(path);
}

if (!path.exists()) {
path.mkdirs();
}

try (Repository repository = new RepositoryBuilder().setGitDir(gitPath).build()) {
if (repository.getObjectDatabase().exists()) {
try (Git git = Git.open(path)) {
Expand Down

0 comments on commit 8f07e9b

Please sign in to comment.