-
-
Notifications
You must be signed in to change notification settings - Fork 490
Open Save as... dialog when saving sketches for the first time #579
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
Conversation
Without this fix, sketches report their URI path as /private/var/xxx whereas `os.tmpdir()` returns /var/xxx. The second path can be turned into the first by resolving symlinks, which gives a canonical path to compare against.
ubidefeo
commented
Nov 2, 2021
This also fixes saving opened examples.
Thank you.
We'll do a code review and get back to you asap ✌️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried it out and it works just as expected for me. Thanks @federicobond!
91volt
commented
Nov 3, 2021
@federicobond Thanks for your contribution! I was checking the behavior when autosave is on and you try to close a newly created or example sketch: it works as expected on cmd/ctrl + w
or going to file > close
, but I've noticed that the dialog doesn't show when quitting the whole arduino IDE cmd/ctrl + q
or closing the workspace from the OS top bar's red quitting icon. Would you be willing to address this one?
@91volt I could not reproduce that. I'm seeing the Are you sure you want to close this sketch? dialog in both cases, with Yes/No buttons.
@federicobond Are you sure auto save is enabled? Arduino IDE / File > Preferences > ☑ Auto save
@91volt interesting... I think it's a bit different problem, so if there aren't any other objections I would prefer to keep that fix out of the scope of this pull request.
I might take a look at it later.
91volt
commented
Nov 4, 2021
@federicobond thanks for checking it, I guess you are right, I'm gonna add a separate issue for that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM ✨
✅ Code review
@federicobond Thank you so much for contributing, your help is very useful and very very much appreciated 😉
Uh oh!
There was an error while loading. Please reload this page.
Closes #64
This is my first contribution to arduino-ide, please let me know if anything is missing.