question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Platformio creates folder instead of using existing one

See original GitHub issue

Temporary 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

  1. Use a german / austrian locale (I think this needs to be done when installing the OS, so reproducing could be little bit hard)
  2. Install PIO
  3. 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:closed
  • Created 2 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
0xFEEDC0DE64commented, Jan 19, 2022

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

0reactions
ivankravetscommented, Jan 20, 2022

@CommanderRedYT thanks for the PR!

I refactored it a little bit. Please re-test with pio upgrade --dev.

Does it work now?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Is it possible to create a new project on the existing code folder?
I have an existing folder which contains src/inc/lib code already, I wonder if it is possible to create a platformio project on this...
Read more >
Create new project starting from source file - PlatformIO IDE
I started to work on a project for an ATmel328P. The project source file are contained only inside a src folder and there...
Read more >
PlatformIO IDE messes up PATH with incorrect default folders ...
When I open an existing PlatformIO project (folder) in VSCode then the problem which I initially described pops up again: the PATH is...
Read more >
New user bit confused with workspcace /folder structure / project
Hi, I have been mainly using the arduino IDE for constructing my projects and yesterday moved to vsscode and platformio, which I have...
Read more >
default_envs - Platformio Docs
go up to one folder. There is a $PROJECT_HASH template variable. You can use it in a directory path. It will by replaced...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found