Skip to content

Commit f9308e2

Browse files
author
Christian Aistleitner
committed
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
1 parent 7b3340a commit f9308e2

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/main/java/com/googlesource/gerrit/plugins/gitblit/GerritGitBlitContext.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class GerritGitBlitContext extends GitblitContext {
6060

6161
void init(ServletContext context) {
6262
// Manually configure IRuntimeManager
63-
runtime.setBaseFolder(sitePaths.site_path);
63+
runtime.setBaseFolder(sitePaths.site_path.toFile());
6464
runtime.getStatus().servletContainer = context.getServerInfo();
6565
runtime.start();
6666

src/main/java/com/googlesource/gerrit/plugins/gitblit/app/GitBlitSettings.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public GitBlitSettings(final LocalDiskRepositoryManager repoManager,
5757
this.properties = new Properties();
5858
this.repoManager = repoManager;
5959
this.config = new GitBlitUrlsConfig(config);
60-
this.etcDir = sitePaths.etc_dir;
60+
this.etcDir = sitePaths.etc_dir.toFile();
6161
load();
6262
}
6363

@@ -77,8 +77,8 @@ private void load() throws IOException {
7777
try {
7878
properties = new Properties();
7979
properties.load(resin);
80-
properties.put("git.repositoriesFolder", repoManager.getBasePath()
81-
.getAbsolutePath());
80+
properties.put("git.repositoriesFolder",
81+
getBasePath().getAbsolutePath());
8282
properties.put("realm.userService",
8383
GerritToGitBlitUserService.class.getName());
8484
if (properties.get("web.otherUrls") != null) {
@@ -112,7 +112,7 @@ private InputStream openPropertiesFile() {
112112
}
113113

114114
public File getBasePath() {
115-
return repoManager.getBasePath();
115+
return repoManager.getBasePath().toFile();
116116
}
117117

118118
@Override

0 commit comments

Comments
 (0)