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-07 15:31:22 +01:00
parent 74687c25f5
commit 81a2ab599f
6 changed files with 20 additions and 4 deletions
+1 -1
View File
@@ -591,7 +591,7 @@ func (f *Fs) List(dir string) (entries fs.DirEntries, err error) {
// cache the directory ID for later lookups
f.dirCache.Put(remote, item.Id)
when, _ := time.Parse(timeFormatIn, item.ModifiedDate)
d := fs.NewDir(remote, when)
d := fs.NewDir(remote, when).SetID(item.Id)
entries = append(entries, d)
case item.Md5Checksum != "" || item.FileSize > 0:
// If item has MD5 sum or a length it is a file stored on drive