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