aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/transport/server/loader.go
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2017-06-18 12:15:40 +0200
committerMáximo Cuadros <mcuadros@gmail.com>2017-06-18 12:15:40 +0200
commitabb9ec0f3efea571b7f19b7391eb7c152c899f45 (patch)
tree703bcd8caf958007e90d6694e5225084b3ddfdb5 /plumbing/transport/server/loader.go
parentbf3a92052f715c507ace0cb9f2b7fb358f623abc (diff)
downloadgo-git-abb9ec0f3efea571b7f19b7391eb7c152c899f45.tar.gz
*: upgrade to go-billy.v3, merge
Diffstat (limited to 'plumbing/transport/server/loader.go')
-rw-r--r--plumbing/transport/server/loader.go10
1 files changed, 7 insertions, 3 deletions
diff --git a/plumbing/transport/server/loader.go b/plumbing/transport/server/loader.go
index 386c2f0..d4eccd4 100644
--- a/plumbing/transport/server/loader.go
+++ b/plumbing/transport/server/loader.go
@@ -5,8 +5,8 @@ import (
"gopkg.in/src-d/go-git.v4/plumbing/transport"
"gopkg.in/src-d/go-git.v4/storage/filesystem"
- "gopkg.in/src-d/go-billy.v2"
- "gopkg.in/src-d/go-billy.v2/osfs"
+ "gopkg.in/src-d/go-billy.v3"
+ "gopkg.in/src-d/go-billy.v3/osfs"
)
// DefaultLoader is a filesystem loader ignoring host and resolving paths to /.
@@ -34,7 +34,11 @@ func NewFilesystemLoader(base billy.Filesystem) Loader {
// storer for it. Returns transport.ErrRepositoryNotFound if a repository does
// not exist in the given path.
func (l *fsLoader) Load(ep transport.Endpoint) (storer.Storer, error) {
- fs := l.base.Dir(ep.Path())
+ fs, err := l.base.Chroot(ep.Path())
+ if err != nil {
+ return nil, err
+ }
+
if _, err := fs.Stat("config"); err != nil {
return nil, transport.ErrRepositoryNotFound
}