diff options
author | liyakun <liyakun127@gmail.com> | 2015-09-10 16:18:40 +0200 |
---|---|---|
committer | liyakun <liyakun127@gmail.com> | 2015-09-15 02:12:56 +0200 |
commit | e2ece2bc350bf881e9716e51c01a59eecac65fc9 (patch) | |
tree | 422d043e1cd6bc09c62fd726958384c320c483d8 /app/services/files | |
parent | 7abb744eb961d95ef9f34e8b64c47084d3f620b6 (diff) | |
download | gitlab-ce-e2ece2bc350bf881e9716e51c01a59eecac65fc9.tar.gz |
Add "Replace" and "Upload" features
Refactor upload and replace functionality
Rename file and move CSS
Fix typo
Make dropzone a div
Remove unnecessary file
Change color of "upload existing one"
Add missing changes
Diffstat (limited to 'app/services/files')
-rw-r--r-- | app/services/files/create_service.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/services/files/create_service.rb b/app/services/files/create_service.rb index 91d715b2d63..ffbb5993279 100644 --- a/app/services/files/create_service.rb +++ b/app/services/files/create_service.rb @@ -19,10 +19,12 @@ module Files end unless project.empty_repo? + @file_path.slice!(0) if @file_path.start_with?('/') + blob = repository.blob_at_branch(@current_branch, @file_path) if blob - raise_error("Your changes could not be committed, because file with such name exists") + raise_error("Your changes could not be committed because a file with the same name already exists") end end end |