studio-b12 / gowebdav

A golang WebDAV client library and command line tool.
BSD 3-Clause "New" or "Revised" License
309 stars 89 forks source link

Stat() for directory does not return last modified time #74

Closed racoon-devel closed 1 year ago

racoon-devel commented 1 year ago

Hello!

When I use Stat()for retrieve directory last modification time, I got zero-time.

In source code (client.go):

  if p.Type.Local == "collection" {
  if !strings.HasSuffix(f.path, "/") {
      f.path += "/"
  }
  f.size = 0
  f.modified = time.Unix(0, 0) // Why ??
  f.isdir = true
  } else {
  f.size = parseInt64(&p.Size)
  f.modified = parseModified(&p.Modified)
  f.isdir = false
}
racoon-devel commented 1 year ago

75

chripo commented 1 year ago

thanks.