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
68aacde6
Commit
68aacde6
authored
Mar 19, 2020
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix new file not being created in non-ascii character folders
parent
ef4a021f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
7 deletions
+15
-7
app/assets/javascripts/repository/components/breadcrumbs.vue
app/assets/javascripts/repository/components/breadcrumbs.vue
+3
-1
app/assets/javascripts/repository/components/table/parent_row.vue
...ts/javascripts/repository/components/table/parent_row.vue
+2
-2
changelogs/unreleased/ph-encodeUriComponentNewDirectoryPath.yml
...logs/unreleased/ph-encodeUriComponentNewDirectoryPath.yml
+5
-0
spec/frontend/repository/components/table/parent_row_spec.js
spec/frontend/repository/components/table/parent_row_spec.js
+5
-4
No files found.
app/assets/javascripts/repository/components/breadcrumbs.vue
View file @
68aacde6
...
...
@@ -134,7 +134,9 @@ export default {
},
{
attrs
:
{
href
:
`
${
this
.
newBlobPath
}
/
${
this
.
currentPath
?
escape
(
this
.
currentPath
)
:
''
}
`
,
href
:
`
${
this
.
newBlobPath
}
/
${
this
.
currentPath
?
encodeURIComponent
(
this
.
currentPath
)
:
''
}
`
,
class
:
'
qa-new-file-option
'
,
},
text
:
__
(
'
New file
'
),
...
...
app/assets/javascripts/repository/components/table/parent_row.vue
View file @
68aacde6
...
...
@@ -25,10 +25,10 @@ export default {
const
splitArray
=
this
.
path
.
split
(
'
/
'
);
splitArray
.
pop
();
return
splitArray
.
join
(
'
/
'
);
return
splitArray
.
map
(
p
=>
encodeURIComponent
(
p
)).
join
(
'
/
'
);
},
parentRoute
()
{
return
{
path
:
`/-/tree/
${
escape
(
this
.
commitRef
)}
/
${
escape
(
this
.
parentPath
)
}
`
};
return
{
path
:
`/-/tree/
${
escape
(
this
.
commitRef
)}
/
${
this
.
parentPath
}
`
};
},
},
methods
:
{
...
...
changelogs/unreleased/ph-encodeUriComponentNewDirectoryPath.yml
0 → 100644
View file @
68aacde6
---
title
:
Fix new file not being created in non-ascii character folders
merge_request
:
26165
author
:
type
:
fixed
spec/frontend/repository/components/table/parent_row_spec.js
View file @
68aacde6
...
...
@@ -31,10 +31,11 @@ describe('Repository parent row component', () => {
});
it
.
each
`
path | to
${
'
app
'
}
|
${
'
/-/tree/master/
'
}
${
'
app/assets
'
}
|
${
'
/-/tree/master/app
'
}
${
'
app/assets#/test
'
}
|
${
'
/-/tree/master/app/assets%23
'
}
path | to
${
'
app
'
}
|
${
'
/-/tree/master/
'
}
${
'
app/assets
'
}
|
${
'
/-/tree/master/app
'
}
${
'
app/assets#/test
'
}
|
${
'
/-/tree/master/app/assets%23
'
}
${
'
app/assets#/test/world
'
}
|
${
'
/-/tree/master/app/assets%23/test
'
}
`
(
'
renders link in $path to $to
'
,
({
path
,
to
})
=>
{
factory
(
path
);
...
...
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