Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arduino IDE deletes entire contents of build.path directory #11672

Open
bluepylons opened this issue Sep 30, 2021 · 2 comments
Open

Arduino IDE deletes entire contents of build.path directory #11672

bluepylons opened this issue Sep 30, 2021 · 2 comments
Labels
Component: Documentation Related to Arduino's documentation content feature request A request to make an enhancement (not a bug fix)

Comments

@bluepylons
Copy link

bluepylons commented Sep 30, 2021

I set my build.path directory to my C:\Users<username>\Downloads folder, so that I could conveniently retrieve the .hex files if needed (There was a week-long period where the only AVR programmer I had was a cheap Chinese thing that used a proprietary program, and I needed the .hex files in a convenient spot to send via that). Unfortunately, I did not realize that Arduino IDE occasionally deletes the entire contents of its build path, and I lost the entirety of my Download folder's contents (which contained many, many, many non-Arduino files., including photographs, memes, old projects, etc., many of which were not backed up).

Can there either be:
1.) A smarter delete routine for the files in the build path so that it doesn't clear out any unrelated files, or:
2.) A huge warning to set your build path in a dedicated directory not shared with any other files.

(edit- fixed several typos)

@per1234 per1234 added Component: Documentation Related to Arduino's documentation content feature request A request to make an enhancement (not a bug fix) labels Sep 30, 2021
@per1234
Copy link
Collaborator

per1234 commented Sep 30, 2021

I think the appropriate place to document this behavior is alongside the documentation of the build.path preference:
https://github.com/arduino/Arduino/blob/master/build/shared/manpage.adoc#preferences

I believe this is the only place the preference is officially documented.

For this particular use case, the IDE's Sketch > Export Compiled Binary is a more user friendly approach.

@bluepylons
Copy link
Author

bluepylons commented Sep 30, 2021

Thank you - I will do that in the future.

Unfortunately I was following a Sparkfun guide that I found off of a Google search, and any updates to the documentation warning of the potentially catastrophic file loss consequences (e.g. someone setting their build.path to their /My Documents/ folder and losing all of their documents) probably won't propagate along to 3rd party articles. If changing the behavior isn't viable (as it would be a fair amount of work to implement a smarter delete routine), would it instead be possible to include a warning as a comment in preferences.txt itself? (though it appears that preferences.txt may not support comments)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Documentation Related to Arduino's documentation content feature request A request to make an enhancement (not a bug fix)
Projects
None yet
Development

No branches or pull requests

2 participants