mirror of
https://github.com/1f349/go-webdav.git
synced 2024-12-23 00:34:23 +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
|
fi.IsDir = true
|
||||||
} else {
|
} else {
|
||||||
var getLen internal.GetContentLength
|
var getLen internal.GetContentLength
|
||||||
var getMod internal.GetLastModified
|
|
||||||
if err := resp.DecodeProp(&getLen, &getMod); err != nil {
|
if err := resp.DecodeProp(&getLen, &getMod); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var getMod internal.GetLastModified
|
||||||
|
if err := resp.DecodeProp(&getMod); err != nil && !internal.IsNotFound(err) {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
var getType internal.GetContentType
|
var getType internal.GetContentType
|
||||||
if err := resp.DecodeProp(&getType); err != nil && !internal.IsNotFound(err) {
|
if err := resp.DecodeProp(&getType); err != nil && !internal.IsNotFound(err) {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
Loading…
Reference in New Issue
Block a user