Properly handle loading files with special characters

This commit is contained in:
Dane Everitt 2020-12-16 21:38:46 -08:00
parent 0084b48d86
commit 5d03c0d2e5
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
2 changed files with 3 additions and 3 deletions

View file

@ -20,7 +20,7 @@ export default async (uuid: string, directory?: string): Promise<FileObject[]> =
const { data } = await http.get(`/api/client/servers/${uuid}/files/list`, {
// At this point the directory is still encoded so we need to decode it since axios
// will automatically re-encode this value before sending it along in the request.
params: { directory: decodeURI(directory ?? '/') },
params: { directory: directory ?? '/' },
});
return (data.data || []).map(rawDataToFileObject);