Skip to content

Commit

Permalink
Use custom time if exists for backups
Browse files Browse the repository at this point in the history
  • Loading branch information
var77 committed May 2, 2024
1 parent b312eef commit 0e074b6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/hosting/gcp_apis.rb
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,8 @@ def list_objects(bucket, pattern)
return []
end

data["items"].map { |hsh| {key: hsh["name"], last_modified: Time.new(hsh["updated"])} }
# customTime will be only present when we migrate a bucket to another bucket
data["items"].map { |hsh| {key: hsh["name"], last_modified: Time.new(hsh["customTime"] || hsh["updated"])} }
end

def get_json_object(bucket, object)
Expand Down

0 comments on commit 0e074b6

Please sign in to comment.