1
1
mirror of https://github.com/openziti/zrok.git synced 2025-07-15 05:35:26 +02:00

remove directory root from directory listing ()

This commit is contained in:
Michael Quigley
2024-01-11 11:44:17 -05:00
parent e40df8c101
commit badff9bd2c
2 changed files with 2 additions and 2 deletions
drives/sync

@ -73,7 +73,7 @@ func (t *WebDAVTarget) Dir(path string) ([]*Object, error) {
} }
var objects []*Object var objects []*Object
for _, fi := range fis { for _, fi := range fis {
if fi.Path != "/" { if fi.Path != "/" && fi.Path != t.cfg.URL.Path+"/" {
objects = append(objects, &Object{ objects = append(objects, &Object{
Path: filepath.Base(fi.Path), Path: filepath.Base(fi.Path),
IsDir: fi.IsDir, IsDir: fi.IsDir,

@ -92,7 +92,7 @@ func (t *ZrokTarget) Dir(path string) ([]*Object, error) {
} }
var objects []*Object var objects []*Object
for _, fi := range fis { for _, fi := range fis {
if fi.Path != "/" { if fi.Path != "/" && fi.Path != t.cfg.URL.Path+"/" {
objects = append(objects, &Object{ objects = append(objects, &Object{
Path: filepath.Base(fi.Path), Path: filepath.Base(fi.Path),
IsDir: fi.IsDir, IsDir: fi.IsDir,