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

Editor gives confusing/cryptic message when save is a sharing violation or to a read-only file #469

Open
electric-socket opened this issue Mar 10, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@electric-socket
Copy link

electric-socket commented Mar 10, 2024

Describe the bug
When saving a file which is simultaneously open in another application (and/or read only), a cryptic error message is generated, even though it should be able to say why.

To Reproduce
Steps to reproduce the behavior:

  1. open a program source file in some other application that keeps the file open or write locked, or mark the file read only
  2. open the same file with QB64pe. This will work because open does not need write access to the file
  3. [Optional] edit the file
  4. Attempt to save the file. If another program has it open, this will fail with error no. 70 as it is a sharing violation.
  5. Error returned is Error 23769-12565 Cannot save file
  6. However, when you open a file that is read-only, on save, the error is
  7. Error 23769-12515 Cannot save file

Expected behavior
For error 12565 the message should be something like "File open in another program" or "Sharing violation" then "cannot save file"
For error 12515 the message should be something like "File is read on;ly" then "cannot save file"

Since the editor is able to differentiate between the two types of save failures, it should explain them more succinctly

Desktop (please complete the following information):

  • OS: Windows 10 Pro Build 19045
  • Browser firefox
  • Version [e.g. 22]c 123.0.1 (64 bit)
  • QB64pe version 3.12.0

Paul Robinson [email protected] - User TDarcos on QB64pe Forum
"The lessons of history teach us - if they teach us anything - that no one learns the lessons that history teaches us."

@electric-socket electric-socket added the bug Something isn't working label Mar 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant