parseListObjectsResponse should handle empty etags

This commit is contained in:
Krishnan Parthasarathi 2017-02-07 16:21:16 +05:30 committed by Aditya Manthramurthy
parent c430e3d747
commit b36fbb3a2f

View File

@ -94,7 +94,10 @@ parseListObjectsResponse xmldata = do
keys = r $/ s3Elem "Contents" &/ s3Elem "Key" &/ content
modTimeStr = r $/ s3Elem "Contents" &/ s3Elem "LastModified" &/ content
etags = r $/ s3Elem "Contents" &/ s3Elem "ETag" &/ content
etagsList = r $/ s3Elem "Contents" &/ s3Elem "ETag" &/ content
-- if response xml contains empty etag response fill them with as
-- many empty Text for the zip4 below to work as intended.
etags = etagsList ++ repeat ""
sizeStr = r $/ s3Elem "Contents" &/ s3Elem "Size" &/ content
modTimes <- mapM parseS3XMLTime modTimeStr