Skip to content
This repository was archived by the owner on Apr 5, 2024. It is now read-only.

Commit e695a42

Browse files
authored
Fix url decoding making folders with umlauts accessable again (#305)
1 parent 23c4f7f commit e695a42

File tree

3 files changed

+2
-8
lines changed

3 files changed

+2
-8
lines changed

src/background/api/filesystem.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export const getFolderContents = (path: string) => {
3232
return new Promise<AxiosResponse<FsEntity[]>>((resolve, reject) => {
3333
let config = {
3434
headers: {
35-
"X-FF-PATH": path,
35+
"X-FF-PATH": decodeURI(path),
3636
},
3737
}
3838
Axios.get<FsEntity[]>(hostname + filesystemPath + "contents", config)

src/components/pages/filesytem/FilesBreadcrumb.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export function FilesBreadcrumb(props: Props): ReactElement {
3535
}
3636
key={i}
3737
>
38-
{folder}{" "}
38+
{decodeURI(folder)}
3939
</Link>
4040
)
4141
})}

src/components/pages/filesytem/__tests__/__snapshots__/FilesBreadcrumb.test.tsx.snap

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,18 @@ Object {
2222
href="/file/bla"
2323
>
2424
bla
25-
2625
</a>
2726
<a
2827
class="breadcrumb-item"
2928
href="/file/bla/fasel"
3029
>
3130
fasel
32-
3331
</a>
3432
<a
3533
class="breadcrumb-item active"
3634
href="/file/bla/fasel/file"
3735
>
3836
file
39-
4037
</a>
4138
</ol>
4239
</nav>
@@ -60,21 +57,18 @@ Object {
6057
href="/file/bla"
6158
>
6259
bla
63-
6460
</a>
6561
<a
6662
class="breadcrumb-item"
6763
href="/file/bla/fasel"
6864
>
6965
fasel
70-
7166
</a>
7267
<a
7368
class="breadcrumb-item active"
7469
href="/file/bla/fasel/file"
7570
>
7671
file
77-
7872
</a>
7973
</ol>
8074
</nav>

0 commit comments

Comments
 (0)