From 2870874329f21eac9109cb9c69c631fdecfcbb36 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Thu, 10 Aug 2017 20:16:30 +0100 Subject: [PATCH] azureblob: Read LastModified time of containers in root listing --- azureblob/azureblob.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/azureblob/azureblob.go b/azureblob/azureblob.go index 7062602b4..166b9f57b 100644 --- a/azureblob/azureblob.go +++ b/azureblob/azureblob.go @@ -422,7 +422,12 @@ func (f *Fs) listContainers(dir string) (entries fs.DirEntries, err error) { return nil, fs.ErrorListBucketRequired } err = f.listContainersToFn(func(container *storage.Container) error { - d := fs.NewDir(container.Name, time.Time{}) + t, err := time.Parse(time.RFC1123, container.Properties.LastModified) + if err != nil { + fs.Debugf(f, "Failed to parse LastModified %q: %v", container.Properties.LastModified, err) + t = time.Time{} + } + d := fs.NewDir(container.Name, t) entries = append(entries, d) return nil })