Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/grack/git.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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$/)

Expand Down
2 changes: 1 addition & 1 deletion lib/grack/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down