diff options
Diffstat (limited to 'repository.go')
-rw-r--r-- | repository.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/repository.go b/repository.go index e8eb53f..7292df6 100644 --- a/repository.go +++ b/repository.go @@ -280,6 +280,9 @@ func dotGitToOSFilesystems(path string, detect bool) (dot, wt billy.Filesystem, pathinfo, err := fs.Stat("/") if !os.IsNotExist(err) { + if pathinfo == nil { + return nil, nil, err + } if !pathinfo.IsDir() && detect { fs = osfs.New(filepath.Dir(path)) } |