mirror of
https://github.com/1f349/go-webdav.git
synced 2024-12-22 08:14:15 +00:00
webdav: make FileInfo.ModTime optional in client
This commit is contained in:
parent
82bdd23de4
commit
83272e2195
@ -61,11 +61,15 @@ func fileInfoFromResponse(resp *internal.Response) (*FileInfo, error) {
|
||||
fi.IsDir = true
|
||||
} else {
|
||||
var getLen internal.GetContentLength
|
||||
var getMod internal.GetLastModified
|
||||
if err := resp.DecodeProp(&getLen, &getMod); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
var getMod internal.GetLastModified
|
||||
if err := resp.DecodeProp(&getMod); err != nil && !internal.IsNotFound(err) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
var getType internal.GetContentType
|
||||
if err := resp.DecodeProp(&getType); err != nil && !internal.IsNotFound(err) {
|
||||
return nil, err
|
||||
|
Loading…
Reference in New Issue
Block a user