From 8a9054f6dc8afcf8849edbd1c8809e94e39c7147 Mon Sep 17 00:00:00 2001 From: Rupak Ganguly Date: Mon, 2 Apr 2012 19:04:02 -0400 Subject: [PATCH] Fix an issue in copy mocking portion. --- lib/fog/hp/requests/storage/put_object.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/fog/hp/requests/storage/put_object.rb b/lib/fog/hp/requests/storage/put_object.rb index 0a06950d2..a1b9895ab 100644 --- a/lib/fog/hp/requests/storage/put_object.rb +++ b/lib/fog/hp/requests/storage/put_object.rb @@ -40,7 +40,13 @@ module Fog container = self.data[:containers][container_name] if (source_container && container) response.status = 201 - container[:objects][object_name] = source_container[:objects][source_object_name] + source_object = source_container[:objects][source_object_name] + target_object = source_object.dup + target_object.merge!({ + 'Key' => object_name, + 'Date' => Fog::Time.now.to_date_header + }) + container[:objects][object_name] = target_object else raise Fog::Storage::HP::NotFound end