Commit 9a1d0c1739ce627b44c94da2e84e3f2d24faea7f
Exists in
spb-stable
and in
3 other branches
Merge pull request #6050 from jvanbaarsen/regex-fix
Allow . files to be created
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 |