Skip to content
Snippets Groups Projects
Commit 836c870c authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Fix edit file

parent ae9dd627
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -32,9 +32,9 @@ class Projects::EditTreeController < Projects::ApplicationController
private
 
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"
end
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment