mirror of
https://github.com/openziti/zrok.git
synced 2025-06-20 17:58:50 +02:00
remove directory root from directory listing (#438)
This commit is contained in:
parent
e40df8c101
commit
badff9bd2c
@ -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,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user