Expected Behavior
When trying to 'save as' the active database with an invalid file name, it should fail, and if 'cancel' is selected after that, future saves should use the original file name.
Current Behavior
If 'save as' fails and is cancelled, future saves will attempt to use the invalid file name, making saving impossible except through 'save as.'
Possible Solution
The 'save as' method changes the database path to the user's input before attempting to save, but doesn't change the path back when the save fails.
Steps to Reproduce
- Database > Save database as
- Enter an invalid file name (e.g. does_not_exist/database.kdbx)
- Attempt to save at least once, then cancel
Attempting to save (except through Save As) will now fail
Context
It's a bit of an obscure situation, but if a user encounters it they could lose data (since it also affects autosaves and saving on close).
Expected Behavior
When trying to 'save as' the active database with an invalid file name, it should fail, and if 'cancel' is selected after that, future saves should use the original file name.
Current Behavior
If 'save as' fails and is cancelled, future saves will attempt to use the invalid file name, making saving impossible except through 'save as.'
Possible Solution
The 'save as' method changes the database path to the user's input before attempting to save, but doesn't change the path back when the save fails.
Steps to Reproduce
Attempting to save (except through Save As) will now fail
Context
It's a bit of an obscure situation, but if a user encounters it they could lose data (since it also affects autosaves and saving on close).