Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Commit

Permalink
feat: decodeURIComponent for file and directory names
Browse files Browse the repository at this point in the history
  • Loading branch information
daviddias committed Sep 2, 2017
1 parent 465d338 commit 4e0ac3f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/http-api/resources/files.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ exports.add = {
const fileAdder = pushable()

parser.on('file', (fileName, fileStream) => {
fileName = decodeURIComponent(fileName)
const filePair = {
path: fileName,
content: toPull(fileStream)
Expand All @@ -188,6 +189,8 @@ exports.add = {
})

parser.on('directory', (directory) => {
directory = decodeURIComponent(directory)

fileAdder.push({
path: directory,
content: ''
Expand Down

0 comments on commit 4e0ac3f

Please sign in to comment.