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

Failed Save - partially completed #3582

Closed
MichaelAtOz opened this issue Jan 4, 2021 · 4 comments
Closed

Failed Save - partially completed #3582

MichaelAtOz opened this issue Jan 4, 2021 · 4 comments

Comments

@MichaelAtOz
Copy link
Member

MichaelAtOz commented Jan 4, 2021

This is probably a matter of taste, but current behaviour is unpalatable to me.

With a new file, File/Save to a location you do not have write permission, give it a proper filename in the save dialogue.
Gets a dialogue box with the following (and in console)

Failed to open file for writing /usr/share/openscad-nightly/examples/Basics/sphere-chopped.scad (Permission denied)

OK so far.

But it then progresses to give the Tab/Title the new filename.
I would expect it to be an atomic operation, if the save fails, the 'untitled.scad' instance stays as it was.

This also happens with Save-As, the editor takes on the new filename, even though it does not exist.
Also the * in the Tab/Title, signifying editor has changes, is no longer shown,
although if you close it, you do get the 'file changed' prompt.

This was on Debian w 2020.12.15.

@t-paul
Copy link
Member

t-paul commented Jan 4, 2021

Can you verify with the latest snapshot? I believe that is fixed via #3576.

@MichaelAtOz
Copy link
Member Author

Screenshot from 2021-01-05 10-35-21
Nope, not fixed, 2020.01.03-nightly, File/New, File/Save, select un-writable directory, give it a name 'save-bug.scad', write error, but editor takes on new name. And same with Save-as, including loss of *.

I'll give it a go on Windows.

@MichaelAtOz
Copy link
Member Author

I'm not a Windows security permissions specialist, I just setup a directory and selected Deny-write.

On Windows, something checks whether it can be written at the Save dialogue box level.

Capture-save-as-bug

Given the dialogue is still open, I assume that something is Windows not OpenSCAD??

@t-paul
Copy link
Member

t-paul commented Jan 5, 2021

Aha, the change I had in mind did cover the recent list, not the editor path update.

@t-paul t-paul added this to To do (get into master) in 2021.01 via automation Jan 5, 2021
@t-paul t-paul closed this as completed in 10b61c1 Jan 5, 2021
t-paul added a commit that referenced this issue Jan 5, 2021
2021.01 automation moved this from To do (get into master) to Ready (pick to branch pending) Jan 5, 2021
@t-paul t-paul moved this from Ready (pick to branch pending) to Done-RC5 in 2021.01 Jan 5, 2021
t-paul added a commit that referenced this issue Jan 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
2021.01
  
Done-RC5
Development

No branches or pull requests

2 participants