Skip to content

Commit b3541ba

Browse files
authored
Merge branch 'main' into jarpsimoes-patch-1
2 parents 781c847 + 6499058 commit b3541ba

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

src/handlers/default_handlers.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ func StaticContentHandler(w http.ResponseWriter, r *http.Request) {
2828
basePath := utils.BuildBranchPath(repoConfig.GetTargetFolder(), branch)
2929

3030
if repoConfig.GetRootFolder() != "" {
31-
basePath = fmt.Sprintf("%s/%s", basePath, repoConfig.GetRootFolder())
31+
32+
basePath = fmt.Sprintf("%s/%s", repoConfig.GetRootFolder(), basePath)
3233

3334
if strings.Contains(basePath, "//") {
3435
basePath = strings.ReplaceAll(basePath, "//", "/")

src/utils/environment_config.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ import (
66
"github.com/go-git/go-git/v5/plumbing/transport/http"
77
"log"
88
"os"
9-
"path/filepath"
10-
"runtime"
119
"sync"
1210
"time"
1311
)
@@ -54,10 +52,7 @@ var baseRepositoryConfigInstance *BaseRepositoryConfig
5452
var basicAuthenticationMethod *BasicAuthenticationMethod
5553
var healthCheckControl *HealthCheckControl
5654
var pathSecurityCheck *PathSecurityCheck
57-
var (
58-
_, b, _, _ = runtime.Caller(0)
59-
basePath = filepath.Dir(b)
60-
)
55+
var basePath, _ = os.Getwd()
6156

6257
// UpdateState [HealthCheckControl] it's a function to update Status
6358
func (hcc *HealthCheckControl) UpdateState(status bool) {

0 commit comments

Comments
 (0)