mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-03-05 03:40:56 +01:00
Move path computation away from protocol handling
This commit is contained in:
@@ -4,4 +4,8 @@ import java.net.URI;
|
||||
|
||||
public interface ScmPathInfo {
|
||||
URI getApiRestUri();
|
||||
|
||||
default URI getRootUri() {
|
||||
return getApiRestUri().resolve("../..");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ public abstract class InitializingHttpScmProtocolWrapper {
|
||||
try {
|
||||
ScmPathInfoStore scmPathInfoStore = uriInfoStore.get();
|
||||
if (scmPathInfoStore != null && scmPathInfoStore.get() != null) {
|
||||
return of(scmPathInfoStore.get().getApiRestUri().resolve("../..").toASCIIString());
|
||||
return of(scmPathInfoStore.get().getRootUri().toASCIIString());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.debug("could not get ScmPathInfoStore from context", e);
|
||||
|
||||
Reference in New Issue
Block a user