lib/keepitsafe.rb in keepitsafe-0.2.3 vs lib/keepitsafe.rb in keepitsafe-0.2.4
- old
+ new
@@ -170,10 +170,10 @@
attr_accessor :start_time, :end_time, :log_buffer, :error, :free_before, :free_after, :backup_size
def set_backup_size remote_path
- raw = (run_cmd("du -hc #{remote_path}").gsub("\n",' ').gsub("\t",' ').strip.match(/([0-9kmgt.]{2,10})\s*total/i) || [0])[1]
+ raw = (run_cmd("du -hc #{remote_path}").gsub("\n",' ').gsub("\t",' ').strip.match(/([0-9kmgt.]{2,10})\s*total/i) || [0,0])[1]
@backup_size = raw_to_meg(raw)
end
private