Skip to content

Commit 843c634

Browse files
aymanbagabaspjbgf
andauthored
fix: update daemon.go
Co-authored-by: Paulo Gomes <paulo.gomes.uk@gmail.com>
1 parent 2e48960 commit 843c634

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmd/gogit/daemon.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ func (d *dirsLoader) Load(ep *transport.Endpoint) (storage.Storer, error) {
8787
// repository.
8888
dfs := d.fss[i]
8989
okFile := filepath.Join(ep.Path, "git-daemon-export-ok")
90-
stat, err := dfs.Stat(okFile)
91-
if err != nil || (stat != nil && stat.IsDir()) {
90+
stat, err := dfs.Lstat(okFile)
91+
if err != nil || (stat != nil && !stat.Mode().IsRegular()) {
9292
// If the file does not exist or is a directory,
9393
// we skip this repository.
9494
continue

0 commit comments

Comments
 (0)