Commit cc1f7ea2de68ba7d2f45a65e36549c63fb23508f
1 parent
71f1a845
Exists in
spb-stable
and in
3 other branches
Allow . files to be created
Fixes: https://github.com/gitlabhq/gitlabhq/issues/5770
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
lib/gitlab/regex.rb
| @@ -17,7 +17,7 @@ module Gitlab | @@ -17,7 +17,7 @@ module Gitlab | ||
| 17 | def path_regex | 17 | def path_regex |
| 18 | default_regex | 18 | default_regex |
| 19 | end | 19 | end |
| 20 | - | 20 | + |
| 21 | def archive_formats_regex | 21 | def archive_formats_regex |
| 22 | #|zip|tar| tar.gz | tar.bz2 | | 22 | #|zip|tar| tar.gz | tar.bz2 | |
| 23 | /(zip|tar|tar\.gz|tgz|gz|tar\.bz2|tbz|tbz2|tb2|bz2)/ | 23 | /(zip|tar|tar\.gz|tgz|gz|tar\.bz2|tbz|tbz2|tb2|bz2)/ |
| @@ -49,7 +49,7 @@ module Gitlab | @@ -49,7 +49,7 @@ module Gitlab | ||
| 49 | protected | 49 | protected |
| 50 | 50 | ||
| 51 | def default_regex | 51 | def default_regex |
| 52 | - /\A[a-zA-Z0-9][a-zA-Z0-9_\-\.]*(?<!\.git)\z/ | 52 | + /\A[.?]?[a-zA-Z0-9][a-zA-Z0-9_\-\.]*(?<!\.git)\z/ |
| 53 | end | 53 | end |
| 54 | end | 54 | end |
| 55 | end | 55 | end |