-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Avoid performing non trivial operations on files #7904
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
Avoid performing non trivial operations on files #7904
Conversation
Fixes arduino#6404 as per @cmaglie comment.
✅ Build completed.
Please test this code using one of the following:
⬇️ http://downloads.arduino.cc/javaide/pull_requests/arduino-PR-7904-BUILD-752-linux32.tar.xz
⬇️ http://downloads.arduino.cc/javaide/pull_requests/arduino-PR-7904-BUILD-752-linux64.tar.xz
⬇️ http://downloads.arduino.cc/javaide/pull_requests/arduino-PR-7904-BUILD-752-windows.zip
⬇️ http://downloads.arduino.cc/javaide/pull_requests/arduino-PR-7904-BUILD-752-macosx.zip
⬇️ http://downloads.arduino.cc/javaide/pull_requests/arduino-PR-7904-BUILD-752-linuxarm.tar.xz
i️ The linuxarm
build is still experimental and may not be always available.
Uhm, I'm a bit confused:
- This talks about fixing Moving a sketch to another folder should move all files #6404 , which is a PR, not an issue?
- This talks about a comment by Cristian, but I see no such comment in Moving a sketch to another folder should move all files #6404 (or Weird errors when sketch name and directory name differ in capitalization only... #6402 , which is the underlying issue).
- Your comment message talks about "avoid non-trivial operations", which suggests to me that the commit removes multiple operations in multiple places, and the messae does not tell me what it does instead. Would it not be better to be more explicit and say "Do not offer to rename a sketch folder when it is named wrongly" or something like that? Also, I'm missing rationale for this change, which IMHO should be in the commit message, not in a vague reference to an issue (which might become unfindable at some point, or even be wrong fro mthe start...)
Argh, I was a bit in a hurry and pasted the wrong link...
I'm also expanding the rationale, just to make explicit where and why the change should be applied.
Thanks for checking anyway 😉
Alternative to arduino#7904, tries to distinguish between * click on a single ino file downloaded from the internet (old behaviour applies, directory is created an the file is moved in it) * click on an ino file that for some reason is part of a project with the wrong name (eg. it was downloaded as zip from github, so the containing folder names becomes "projectName-master"). In this case if the directory is created one level above the selected file, all files are moved there and the original directory is recursively deleted)
Alternative to arduino#7904, tries to distinguish between * click on a single ino file downloaded from the internet (old behaviour applies, directory is created an the file is moved in it) * click on an ino file that for some reason is part of a project with the wrong name (eg. it was downloaded as zip from github, so the containing folder names becomes "projectName-master"). In this case if the directory is created one level above the selected file, all files are moved there and the original directory is recursively deleted)
Follow up on #7909
Uh oh!
There was an error while loading. Please reload this page.
Fixes #7843 as per @cmaglie comment.
Translations should be updated removing the second part of the information text.
RATIONALE:
Problem: most of the times .ino files downloads from the web are being saved in the Download folder, so the move operation copied the whole Downloads content into that folder 😳
@cmaglie suggested the IDE shouldn't be allowed to do this kind of operations; this patch removes the automatic move and requires the user to create the folder and move .ino file inside it manually