Switch to using Path instead of File for sitePaths
Core upstream changed SitePaths to yield Paths instead of
Files. Hence, we follow that move.
Change-Id: Ie0008379510910f6bb7fdecd491a7485b936ce06
diff --git a/src/main/java/com/googlesource/gerrit/plugins/gitblit/GerritGitBlitContext.java b/src/main/java/com/googlesource/gerrit/plugins/gitblit/GerritGitBlitContext.java
index 6e3d101..d32e5e9 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/gitblit/GerritGitBlitContext.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/gitblit/GerritGitBlitContext.java
@@ -60,7 +60,7 @@
void init(ServletContext context) {
// Manually configure IRuntimeManager
- runtime.setBaseFolder(sitePaths.site_path);
+ runtime.setBaseFolder(sitePaths.site_path.toFile());
runtime.getStatus().servletContainer = context.getServerInfo();
runtime.start();
diff --git a/src/main/java/com/googlesource/gerrit/plugins/gitblit/app/GitBlitSettings.java b/src/main/java/com/googlesource/gerrit/plugins/gitblit/app/GitBlitSettings.java
index 67a3090..e81ef0d 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/gitblit/app/GitBlitSettings.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/gitblit/app/GitBlitSettings.java
@@ -57,7 +57,7 @@
this.properties = new Properties();
this.repoManager = repoManager;
this.config = new GitBlitUrlsConfig(config);
- this.etcDir = sitePaths.etc_dir;
+ this.etcDir = sitePaths.etc_dir.toFile();
load();
}
@@ -77,8 +77,8 @@
try {
properties = new Properties();
properties.load(resin);
- properties.put("git.repositoriesFolder", repoManager.getBasePath()
- .getAbsolutePath());
+ properties.put("git.repositoriesFolder",
+ getBasePath().getAbsolutePath());
properties.put("realm.userService",
GerritToGitBlitUserService.class.getName());
if (properties.get("web.otherUrls") != null) {
@@ -112,7 +112,7 @@
}
public File getBasePath() {
- return repoManager.getBasePath();
+ return repoManager.getBasePath().toFile();
}
@Override