summaryrefslogtreecommitdiff
path: root/app/services/files
diff options
context:
space:
mode:
authorCiro Santilli <ciro.santilli@gmail.com>2014-06-26 09:53:01 +0200
committerCiro Santilli <ciro.santilli@gmail.com>2014-06-26 13:31:34 +0200
commitb1c40e81510ccccc5e93a82d2f5b819d6dea69e5 (patch)
treef597169e68893bb35cf1b1a8a36d355a097c8293 /app/services/files
parent3f8e6cf3d1360ce0843e4fd8f9c04040aba2baae (diff)
downloadgitlab-ce-b1c40e81510ccccc5e93a82d2f5b819d6dea69e5.tar.gz
Fix username validation message to match regexp.
Also used for project, group and web ui new file names.
Diffstat (limited to 'app/services/files')
-rw-r--r--app/services/files/create_service.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/services/files/create_service.rb b/app/services/files/create_service.rb
index 1998fb79e7d..82e4d7b684f 100644
--- a/app/services/files/create_service.rb
+++ b/app/services/files/create_service.rb
@@ -21,7 +21,10 @@ module Files
file_path = path
unless file_name =~ Gitlab::Regex.path_regex
- return error("Your changes could not be committed, because file name contains not allowed characters")
+ return error(
+ 'Your changes could not be committed, because the file name ' +
+ Gitlab::Regex.path_regex_message
+ )
end
blob = repository.blob_at_branch(ref, file_path)