From c07d57d19947b3fc2b53001ff94039ebd611af7f Mon Sep 17 00:00:00 2001 From: Ransom Richardson Date: Thu, 27 Sep 2012 16:18:03 -0400 Subject: [PATCH] Handle user not being returned from list_objects --- src/erlcloud_s3.erl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/erlcloud_s3.erl b/src/erlcloud_s3.erl index 13b64790..38d7e824 100644 --- a/src/erlcloud_s3.erl +++ b/src/erlcloud_s3.erl @@ -270,6 +270,8 @@ extract_contents(Nodes) -> {owner, "Owner", fun extract_user/1}], [erlcloud_xml:decode(Attributes, Node) || Node <- Nodes]. +extract_user([]) -> + []; extract_user([Node]) -> Attributes = [{id, "ID", text}, {display_name, "DisplayName", optional_text}],