diff options
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/projects_helper.rb | 8 | ||||
-rw-r--r-- | app/helpers/workhorse_helper.rb | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb index f2abb241753..f5cae40aa86 100644 --- a/app/helpers/projects_helper.rb +++ b/app/helpers/projects_helper.rb @@ -26,6 +26,14 @@ module ProjectsHelper image_tag(src, width: opts[:size], class: classes, alt: '', "data-src" => avatar) end + + def is_directory + @path.empty? ? false : true + end + + def get_directory_path + @path ? "#{@path}/" : '' + end def author_content_tag(author, opts = {}) default_opts = { author_class: 'author', tooltip: false, by_username: false } diff --git a/app/helpers/workhorse_helper.rb b/app/helpers/workhorse_helper.rb index bb5b1555dc4..7c49a6e1c6d 100644 --- a/app/helpers/workhorse_helper.rb +++ b/app/helpers/workhorse_helper.rb @@ -31,6 +31,7 @@ module WorkhorseHelper # Archive a Git repository and send it through Workhorse def send_git_archive(repository, **kwargs) + kwargs.delete(:subdirectory) if kwargs[:subdirectory].nil? headers.store(*Gitlab::Workhorse.send_git_archive(repository, **kwargs)) head :ok end |