Skip to content
Snippets Groups Projects
Commit 9cc498a6 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets Committed by Wes Gurney
Browse files

Fix edit file

parent 709b20eb
No related branches found
No related tags found
1 merge request!4954Add support to configure webhook_timeout in gitlab.yaml
This commit is part of merge request !4954. Comments created here will be created in the context of that merge request.
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