Commit 836c870c authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Fix edit file

parent ae9dd627
...@@ -32,9 +32,9 @@ class Projects::EditTreeController < Projects::ApplicationController ...@@ -32,9 +32,9 @@ class Projects::EditTreeController < Projects::ApplicationController
private private
def edit_requirements def edit_requirements
@blob = Gitlab::Git::Blob.new(@repository, @commit.id, @ref, @path) @blob = Gitlab::Git::Blob.find(@repository, @commit.id, @path)
unless @blob.exists? && @blob.text? unless @blob
redirect_to project_blob_path(@project, @id), notice: "You can only edit text files" redirect_to project_blob_path(@project, @id), notice: "You can only edit text files"
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment