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:
open a program source file in some other application that keeps the file open or write locked, or mark the file read only
open the same file with QB64pe. This will work because open does not need write access to the file
[Optional] edit the file
Attempt to save the file. If another program has it open, this will fail with error no. 70 as it is a sharing violation.
Error returned is Error 23769-12565 Cannot save file
However, when you open a file that is read-only, on save, the error is
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 paul@paul-robinson.us - 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."
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:
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):
Paul Robinson paul@paul-robinson.us - 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."