mirror of https://github.com/Xhofe/alist
✨ remove . and .. for FTP
parent
12af9cb89f
commit
26b4766da7
|
@ -25,4 +25,5 @@ bin/*
|
|||
*.json
|
||||
public/index.html
|
||||
public/assets/
|
||||
public/public/
|
||||
data/
|
|
@ -127,6 +127,9 @@ func (driver FTP) Files(path string, account *model.Account) ([]model.File, erro
|
|||
res := make([]model.File, 0)
|
||||
for i, _ := range entries {
|
||||
entry := entries[i]
|
||||
if entry.Name == "." || entry.Name == ".." {
|
||||
continue
|
||||
}
|
||||
f := model.File{
|
||||
Name: entry.Name,
|
||||
Size: int64(entry.Size),
|
||||
|
|
Loading…
Reference in New Issue