Rank: Member Groups: Registered
Joined: 28/11/2017(UTC) Posts: 20 Location: Pisa Was thanked: 2 time(s) in 2 post(s)
|
Hello to Everybody, I just noted a strange behaviour of Smath, I am using release 99.6622 but I believe it is the same in other versions. If you open a file on the fly (without downloading) from an external source (i.e.: Smath Forum) and then you make any change to it, when you close the file you are prompted with a request to save the file. If you (improperly) answer "Yes", Smath crashes. I think Smath is right in the sense that you shouldn't save to a read-only location, but for the sake of completeness, you might want to protect against improper use from inexperienced users... Thanks for the attention Marco
|
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 13/01/2012(UTC) Posts: 2,639 Location: Italy Was thanked: 1323 time(s) in 873 post(s)
|
Grazie Marco Bug confirmed (unhandled System.UnauthorizedAccessException). Guess the right way is: 1) check for permissions 2) If permissions are denied, prompt the "save as" dialog; Edited by user 20 February 2018 13:22:21(UTC)
| Reason: Not specified |
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects |
|
|
|
Rank: Administration Groups: Developers, Registered, Knovel Developers, Administrators, Advanced Member Joined: 11/07/2008(UTC) Posts: 1,616 Was thanked: 1978 time(s) in 666 post(s)
|
Hello, Davide.
I've made some improvements to saving logic. Please could you check the same scenario with latest sources? Unfortunately I'm unable to reproduce this issue.
Thanks in advance!
|
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 13/01/2012(UTC) Posts: 2,639 Location: Italy Was thanked: 1323 time(s) in 873 post(s)
|
Hello Andrey, Not fixed with your improvements. To reproduce simply mark a file as readonly from the system file properties before opening it with SS. In my sandbox folder there is a possible solution |
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects |
1 user thanked Davide Carpi for this useful post.
|
|
|
Rank: Guest
Groups: Registered
Joined: 04/07/2015(UTC) Posts: 6,868 Was thanked: 980 time(s) in 808 post(s)
|
Originally Posted by: MBernacca Hello to Everybody,
I just noted a strange behaviour of Smath, I am using release 99.6622 but I believe it is the same in other versions. If you open a file on the fly (without downloading) from an external source (i.e.: Smath Forum) and then you make any change to it, when you close the file you are prompted with a request to save the file. If you (improperly) answer "Yes", Smath crashes. I think Smath is right in the sense that you shouldn't save to a read-only location, but for the sake of completeness, you might want to protect against improper use from inexperienced users...
Thanks for the attention Marco Hello Marco, Superb description, the missing link is that if you save from open on the fly, good thing Smath crashes ... What ! Yes What, how Smath knows where to save ? Back to originator ... no way. Why not Save as ... Have you tried copy/paste on new sheet => Save as in some addressed location ? Jean
|
|
|
|
Rank: Advanced Member Groups: Registered, Advanced Member Joined: 13/01/2012(UTC) Posts: 2,639 Location: Italy Was thanked: 1323 time(s) in 873 post(s)
|
Originally Posted by: Jean Giraud Yes What, how Smath knows where to save ? Back to originator ... no way. Why not Save as ... This is not a big deal, the file downloaded for reading is stored in a temporary path and flushed when you close the browser, Smath knows the path and since is a temp folder can write in it . But the downloaded file it is set as read-only and can't be overwritten (this is not handled, hence the crash); best way from my point of view is to simply prompt the "save as" dialog that is opened on the default location; this it works on any read-only file, and you can still get an error messsage from the system if you try to overwrite the file from within the dialog. Edited by user 21 February 2018 21:19:58(UTC)
| Reason: Not specified |
If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects |
|
|
|
Rank: Administration Groups: Developers, Registered, Knovel Developers, Administrators, Advanced Member Joined: 11/07/2008(UTC) Posts: 1,616 Was thanked: 1978 time(s) in 666 post(s)
|
Thank you very much Davide!
I've taken your fix as a basis and extended it to support all possible places where saving to file may be called (i.e. desktop UI, silent mode, etc.). So, this is done now.
Best regards.
|
1 user thanked Andrey Ivashov for this useful post.
|
|
|
Rank: Administration Groups: Developers, Registered, Knovel Developers, Administrators, Advanced Member Joined: 11/07/2008(UTC) Posts: 1,616 Was thanked: 1978 time(s) in 666 post(s)
|
|
1 user thanked Andrey Ivashov for this useful post.
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.