Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
On windows, recursively upload of folders breaks and files are uploaded with leading \ and other characters.
While manual creation of folders and uploads of files within newly created folders works, if the user tries to upload a whole folder, the recursive process creates the folder at destination, as per
createFolder
action, but the files within the folders are uploaded with an unsanitized path, containing Windows' back-slash, hence “creating” a file with a name containing a “broken” path.Slashes should be sanitized when it comes to destination path.
How to reproduce
On your local filesystem create a folder named
test_folder
Enter this folder and create 2 files:
The files can be empty
Connect your board, select the folder and “upload” it as a whole.
Solution
Making sure relative path won't contain initial separator.