Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
96d4f22e
Commit
96d4f22e
authored
Sep 11, 2012
by
Saito
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tree view need use ascii-8bit, file name need be utf8.
parent
1c08cb40
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
3 deletions
+4
-3
app/helpers/tree_helper.rb
app/helpers/tree_helper.rb
+2
-1
app/models/tree.rb
app/models/tree.rb
+1
-1
app/views/refs/_tree_file.html.haml
app/views/refs/_tree_file.html.haml
+1
-1
No files found.
app/helpers/tree_helper.rb
View file @
96d4f22e
...
...
@@ -18,7 +18,8 @@ module TreeHelper
end
def
tree_full_path
(
content
)
if
params
[
:path
]
content
.
name
.
force_encoding
(
'utf-8'
)
if
params
[
:path
]
File
.
join
(
params
[
:path
],
content
.
name
)
else
content
.
name
...
...
app/models/tree.rb
View file @
96d4f22e
...
...
@@ -16,7 +16,7 @@ class Tree
def
initialize
(
raw_tree
,
project
,
ref
=
nil
,
path
=
nil
)
@project
,
@ref
,
@path
=
project
,
ref
,
path
,
@tree
=
if
path
raw_tree
/
path
raw_tree
/
path
.
dup
.
force_encoding
(
'ascii-8bit'
)
else
raw_tree
end
...
...
app/views/refs/_tree_file.html.haml
View file @
96d4f22e
...
...
@@ -2,7 +2,7 @@
.file_title
%i
.icon-file
%span
.file_name
=
name
=
name
.
force_encoding
(
'utf-8'
)
%small
#{
file
.
mode
}
%span
.options
=
link_to
"raw"
,
blob_project_ref_path
(
@project
,
@ref
,
path:
params
[
:path
]),
class:
"btn very_small"
,
target:
"_blank"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment