Merge pull request #38 from wolfsblu/master

Replace deprecated exists call
This commit is contained in:
Tony Schneider
2023-01-24 17:31:01 -05:00
committed by GitHub

View File

@@ -218,7 +218,7 @@ module Neo
def add_progress(prog)
@_contents = nil
exists = File.exists?(PROGRESS_FILE_NAME)
exists = File.exist?(PROGRESS_FILE_NAME)
File.open(PROGRESS_FILE_NAME,'a+') do |f|
f.print "#{',' if exists}#{prog}"
end
@@ -226,7 +226,7 @@ module Neo
def progress
if @_contents.nil?
if File.exists?(PROGRESS_FILE_NAME)
if File.exist?(PROGRESS_FILE_NAME)
File.open(PROGRESS_FILE_NAME,'r') do |f|
@_contents = f.read.to_s.gsub(/\s/,'').split(',')
end