Create fs.Directory interface and use it everywhere
This commit is contained in:
@@ -423,14 +423,9 @@ func (f *Fs) List(dir string) (entries fs.DirEntries, err error) {
|
||||
if info.Folder != nil {
|
||||
// cache the directory ID for later lookups
|
||||
f.dirCache.Put(remote, info.ID)
|
||||
d := &fs.Dir{
|
||||
Name: remote,
|
||||
Bytes: -1,
|
||||
Count: -1,
|
||||
When: time.Time(info.LastModifiedDateTime),
|
||||
}
|
||||
d := fs.NewDir(remote, time.Time(info.LastModifiedDateTime))
|
||||
if info.Folder != nil {
|
||||
d.Count = info.Folder.ChildCount
|
||||
d.SetItems(info.Folder.ChildCount)
|
||||
}
|
||||
entries = append(entries, d)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user