diff --git a/url.go b/url.go index fdf04d49..7d84fcad 100644 --- a/url.go +++ b/url.go @@ -107,6 +107,12 @@ func url2DirContent(urlStr string) (content *client.Content, err *probe.Error) { if err != nil { return nil, err.Trace(urlStr) } + if clnt.GetURL().Path == string(clnt.GetURL().Separator) { + content := new(client.Content) + content.URL = clnt.GetURL() + content.Type = os.ModeDir + return content, nil + } isRecursive := false isIncomplete := false for entry := range clnt.List(isRecursive, isIncomplete) {