sg-wireless / pymakr-vsc

GNU General Public License v3.0
97 stars 25 forks source link

[BUG] pymaker2 project downloads to incorrect folder #258

Closed Josverl closed 2 years ago

Josverl commented 2 years ago

The bug

The download destination folder is malformed / concatenated when downloading

To Reproduce Steps to reproduce the behavior:

  1. Upload a project to an MCU from a workspace folder './minified'
  2. run a script that created a folder structure ; something like :
    • /stubs
    • /stubs/micropython-v1_19_1-esp8266
    • /stubs/micropython-v1_19_1-esp8266/zlib.py
  3. Download the project
  4. the MCU's /stubs folder in not downloaded to the ./minified/stubs folder but to the .minifiedstubs folder

Expected behavior downloaded folder structure to be located inside the project folder

Screenshots image

image

Desktop (please complete the following information):

Version: 1.68.1 (user setup) Commit: 30d9c6cd9483b2cc586687151bcbcd635f373630 Date: 2022-06-14T12:48:58.283Z Electron: 17.4.7 Chromium: 98.0.4758.141 Node.js: 16.13.0 V8: 9.8.177.13-electron.0 OS: Windows_NT x64 10.0.22000

jakobrosenberg commented 2 years ago

Thanks for reporting this. I wasn't able to replicate the issue on my Pycom devices. I suspect the issue is the root path.

When files are downloaded, the root path is stripped from the source. This means /flash/myfile.py without /flash becomes /myfile.py, but /myfile.py without / becomes myfile.py.

I've updated the script to replace root path plus trailing slashes with a single slash to ensure we have a separator. Will push a fix now.

jakobrosenberg commented 2 years ago

:tada: This issue has been resolved in version 2.18.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket: