mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-19 09:36:47 +10:00
Extract artifacts metadata implementation to separate class
This commit is contained in:
@@ -75,7 +75,7 @@ module Gitlab
|
||||
end
|
||||
|
||||
def directories!
|
||||
has_parent? ? directories.prepend(parent) : directories
|
||||
@path =~ %r{^\./[^/]/} ? directories.prepend(parent) : directories
|
||||
end
|
||||
|
||||
def files
|
||||
@@ -119,7 +119,7 @@ module Gitlab
|
||||
raise ArgumentError, 'Invalid path' if clean_path.start_with?('../')
|
||||
|
||||
prefix = './' unless clean_path =~ %r{^[\.|/]}
|
||||
suffix = '/' if path.end_with?('/') || clean_path =~ /^[\.|\.\.]$/
|
||||
suffix = '/' if path.end_with?('/') || ['.', '..'].include?(clean_path)
|
||||
prefix.to_s + clean_path + suffix.to_s
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user