Skip to content

Commit

Permalink
fix: allows spaces in bot project path (microsoft#4260)
Browse files Browse the repository at this point in the history
  • Loading branch information
liweitian authored Sep 24, 2020
1 parent 4137a2c commit ad77082
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export const storageDispatcher = () => {
(callbackHelpers: CallbackInterface) => async (id: string, path: string) => {
const { set } = callbackHelpers;
try {
const response = await httpClient.get(`/storages/${id}/blobs`, { params: { path } });
const response = await httpClient.get(`/storages/${id}/blobs`, { params: { path: encodeURIComponent(path) } });
const fetchedFocusStorage = response.data;
fetchedFocusStorage.children = fetchedFocusStorage.children.reduce((files, file) => {
if (file.type === FileTypes.FOLDER) {
Expand Down
2 changes: 1 addition & 1 deletion Composer/packages/server/src/controllers/storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ async function getBlob(req: Request, res: Response) {
if (!req.query.path) {
throw new Error('path missing from query');
}
const reqpath = decodeURI(req.query.path);
const reqpath = decodeURIComponent(req.query.path);
if (!Path.isAbsolute(reqpath)) {
throw new Error('path must be absolute');
}
Expand Down

0 comments on commit ad77082

Please sign in to comment.