diff --git a/lib/grack/git.rb b/lib/grack/git.rb index 8469575..7bfc54a 100644 --- a/lib/grack/git.rb +++ b/lib/grack/git.rb @@ -57,7 +57,7 @@ def config(config_name) end def valid_repo? - return false unless File.exists?(repo) && File.realpath(repo) == repo + return false unless File.exist?(repo) && File.realpath(repo) == repo match = execute(%W(rev-parse --git-dir)).match(/\.$|\.git$/) diff --git a/lib/grack/server.rb b/lib/grack/server.rb index 59e0bc2..15474e6 100644 --- a/lib/grack/server.rb +++ b/lib/grack/server.rb @@ -163,7 +163,7 @@ def get_text_file # some of this borrowed from the Rack::File implementation def send_file(reqfile, content_type) reqfile = File.join(git.repo, reqfile) - return render_not_found unless File.exists?(reqfile) + return render_not_found unless File.exist?(reqfile) return render_not_found unless reqfile == File.realpath(reqfile)