From 6f46fa34d3078399acaa962a89900ac5db3a6116 Mon Sep 17 00:00:00 2001
From: James Moger <james.moger@gitblit.com>
Date: Tue, 27 Dec 2011 17:31:50 -0500
Subject: [PATCH] Documentation.

---
 src/com/gitblit/GitBlit.java |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/src/com/gitblit/GitBlit.java b/src/com/gitblit/GitBlit.java
index 4f08de4..a468060 100644
--- a/src/com/gitblit/GitBlit.java
+++ b/src/com/gitblit/GitBlit.java
@@ -905,6 +905,11 @@
 									.format("Can not rename repository ''{0}'' to ''{1}'' because ''{1}'' already exists.",
 											repositoryName, repository.name));
 				}
+				File parentFile = destFolder.getParentFile();
+				if (!parentFile.exists() && !parentFile.mkdirs()) {
+					throw new GitBlitException(MessageFormat.format(
+							"Failed to create folder ''{0}''", parentFile.getAbsolutePath()));
+				}
 				if (!folder.renameTo(destFolder)) {
 					throw new GitBlitException(MessageFormat.format(
 							"Failed to rename repository ''{0}'' to ''{1}''.", repositoryName,
@@ -1479,7 +1484,7 @@
 		}
 		return scripts;
 	}
-
+	
 	public List<String> getInheritedPreReceiveScripts(RepositoryModel repository) {
 		Set<String> globals = new HashSet<String>();
 		for (String script : getStrings(Keys.groovy.preReceiveScripts)) {

--
Gitblit v1.9.1