remove directory root from directory listing (#438)

This commit is contained in:
Michael Quigley 2024-01-11 11:44:17 -05:00
parent e40df8c101
commit badff9bd2c
No known key found for this signature in database
GPG Key ID: 9B60314A9DD20A62
2 changed files with 2 additions and 2 deletions

View File

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

View File

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