lib/d3/client/receipt.rb in depot3-3.0.14 vs lib/d3/client/receipt.rb in depot3-3.0.15
- old
+ new
@@ -1121,17 +1121,17 @@
if app_usage_update_age > MAX_APP_USAGE_UPDATE_AGE
D3.log "Last app usage update more than #{MAX_APP_USAGE_UPDATE_AGE} seconds ago.", :debug
return nil
end
- # loop through the plists, get the newest usage time for this
- # expiration path, and append it to all_usages
+ # loop through the plists, get the newest usage time for any
+ # expiration paths, and append it to all_usages
all_usages = []
plists.each do |plist|
usage_times = D3.parse_plist plist
my_usage_keys = usage_times.keys.map{|p| Pathname.new(p)}
exp_paths_with_usage = @expiration_paths & my_usage_keys
- exp_paths_with_usage.each{|p| all_usages << usage_times[p] }
+ exp_paths_with_usage.each{|p| all_usages << usage_times[p.to_s] }
end # do plist
@last_usage = all_usages.compact.max
# if never been used, last usage is the install date