Decode the filename when rendering it to the screen; closes #2101

This commit is contained in:
Dane Everitt 2020-06-13 09:49:32 -07:00
parent 050fe307f0
commit b30d7429f3
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
3 changed files with 10 additions and 5 deletions

View file

@ -25,10 +25,10 @@ export default ({ withinFileEditor, isNewFile }: Props) => {
.filter(directory => !!directory)
.map((directory, index, dirs) => {
if (!withinFileEditor && index === dirs.length - 1) {
return { name: directory };
return { name: decodeURIComponent(directory) };
}
return { name: directory, path: `/${dirs.slice(0, index + 1).join('/')}` };
return { name: decodeURIComponent(directory), path: `/${dirs.slice(0, index + 1).join('/')}` };
});
return (
@ -57,7 +57,7 @@ export default ({ withinFileEditor, isNewFile }: Props) => {
}
{file &&
<React.Fragment>
<span className={'px-1 text-neutral-300'}>{file}</span>
<span className={'px-1 text-neutral-300'}>{decodeURIComponent(file)}</span>
</React.Fragment>
}
</div>