mirror of
https://github.com/1f349/go-webdav.git
synced 2024-12-22 08:14:15 +00:00
webdav: make FileInfo.ModTime optional
This commit is contained in:
parent
02d1a7dbe8
commit
23fa5c582c
@ -166,8 +166,11 @@ func (b *backend) propfindFile(propfind *internal.Propfind, fi *FileInfo) (*inte
|
||||
props[internal.GetContentLengthName] = func(*internal.RawXMLValue) (interface{}, error) {
|
||||
return &internal.GetContentLength{Length: fi.Size}, nil
|
||||
}
|
||||
props[internal.GetLastModifiedName] = func(*internal.RawXMLValue) (interface{}, error) {
|
||||
return &internal.GetLastModified{LastModified: internal.Time(fi.ModTime)}, nil
|
||||
|
||||
if !fi.ModTime.IsZero() {
|
||||
props[internal.GetLastModifiedName] = func(*internal.RawXMLValue) (interface{}, error) {
|
||||
return &internal.GetLastModified{LastModified: internal.Time(fi.ModTime)}, nil
|
||||
}
|
||||
}
|
||||
|
||||
if fi.MIMEType != "" {
|
||||
|
Loading…
Reference in New Issue
Block a user