fs: add optional ID to fs.Directory and set it in the remotes which care

This commit is contained in:
Nick Craig-Wood 2017-08-02 16:44:36 +01:00
parent 74687c25f5
commit 81a2ab599f
6 changed files with 20 additions and 4 deletions

View file

@ -427,7 +427,7 @@ func (f *Fs) List(dir string) (entries fs.DirEntries, err error) {
// cache the directory ID for later lookups
f.dirCache.Put(remote, *node.Id)
when, _ := time.Parse(timeFormat, *node.ModifiedDate) // FIXME
d := fs.NewDir(remote, when)
d := fs.NewDir(remote, when).SetID(*node.Id)
entries = append(entries, d)
case fileKind:
o, err := f.newObjectWithInfo(remote, node)