Platformio creates folder instead of using existing one
See original GitHub issueTemporary solution
Change default project directory using https://docs.platformio.org/en/latest/core/userguide/cmd_settings.html#projects-dir
What kind of issue is this?
- PlatformIO Core. Issue with Files created by the PlatformIO Core.
Configuration
Operating system: Arch Linux (5.16.1-arch1-1; x86_64)
PlatformIO Version (platformio --version
): PlatformIO Core, version 5.2.4
Description of problem
When using different locale (for example german), the Default-Folder is in the wrong place. On german / austrian systems, we don’t have the “Documents”-folder, but the “Dokumente”-folder. When Platformio now creates the PlatformIO/Projects/… folder, it creates a ~/Documents folder. I am aware that I can change the default projects folder path, but this is the default path so i would assume that I would not have to change this.
Steps to Reproduce
- Use a german / austrian locale (I think this needs to be done when installing the OS, so reproducing could be little bit hard)
- Install PIO
- There should be a folder called “Dokumente” and one called “Documents”
Actual Results
Two folders, each with the same name but in different languages.
Expected Results
PlatformIO should check the locale and create the folder based on that. This could be done by for example using the xdg-user-dir
command.
[user@archlinux ~]$ xdg-user-dir DOCUMENTS
/home/user/Dokumente # on german systems
/home/user/Documents # on english systems
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (6 by maintainers)
Platformio is not meant for anything productive, just rapid prototyping for an evening session and then throw away projects. No wonder they even do this completely wrong
@CommanderRedYT thanks for the PR!
I refactored it a little bit. Please re-test with
pio upgrade --dev
.Does it work now?