mirror of
https://github.com/openziti/zrok.git
synced 2025-07-15 05:35:26 +02:00
remove directory root from directory listing (#438)
This commit is contained in:
@ -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,
|
||||||
|
Reference in New Issue
Block a user