Skip to content

Commit

Permalink
Fixes conversion of hdd size from TB to GB (#101)
Browse files Browse the repository at this point in the history
  • Loading branch information
Manisha15 authored Jan 24, 2025
1 parent a147bee commit a1a8dc4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/fog/proxmox/helpers/disk_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,10 @@ def self.modulo_bytes(size)
end

def self.to_human_bytes(size)
units = %w[Kb Mb Gb Tb Pb]
units = %w[Kb Mb Gb]
i = 0
human_size = size.to_s + 'b'
while i < 5 && size >= 1024
while i < 3 && size >= 1024
size = modulo_bytes(size)
human_size = size.to_s + units[i]
i += 1
Expand Down

0 comments on commit a1a8dc4

Please sign in to comment.