diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-07-04 14:10:34 -0500 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2017-07-04 15:16:34 -0500 |
commit | 82614f8675bd4cdcc9500f7550e4f6a0598904fb (patch) | |
tree | d18f10cc1f810f4413caed263924a515e1421786 /lib/gitlab | |
parent | 58990f1b7f86f3ab18ab6fb20dfa664179e3d738 (diff) | |
download | gitlab-ce-82614f8675bd4cdcc9500f7550e4f6a0598904fb.tar.gz |
Fix issues with non-UTF8 filenames by always fixing the encoding of tree and blob pathsdm-encode-tree-and-blob-paths
Diffstat (limited to 'lib/gitlab')
-rw-r--r-- | lib/gitlab/git/blob.rb | 4 | ||||
-rw-r--r-- | lib/gitlab/git/tree.rb | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/lib/gitlab/git/blob.rb b/lib/gitlab/git/blob.rb index a7aceab4c14..ffe4f3ca95f 100644 --- a/lib/gitlab/git/blob.rb +++ b/lib/gitlab/git/blob.rb @@ -175,6 +175,10 @@ module Gitlab encode! @name end + def path + encode! @path + end + def truncated? size && (size > loaded_size) end diff --git a/lib/gitlab/git/tree.rb b/lib/gitlab/git/tree.rb index b9afa05c819..b6d4e6cfe46 100644 --- a/lib/gitlab/git/tree.rb +++ b/lib/gitlab/git/tree.rb @@ -80,6 +80,10 @@ module Gitlab encode! @name end + def path + encode! @path + end + def dir? type == :tree end |