godotengine / godotengine/godot
open_encrypted_with_pass() shouldn't report error on fail in the editor
- Dominant language
- C++
- Stars
- 117k
- Forks
- 26.8k
- PR merge metrics
- PR metrics pending
Description
### Tested versions
4.2.1.stable
### System information
Windows 10
### Issue description
using `open_encrypted_with_pass()` with the wrong pass triggers an editor error.
The problem with this is that we don't have anything to test before trying to open, like a validation of sorts, and we also know that if the pass is wrong, the return will be `null` and we can get the reason with `get_open_error()`, so I can't understand why the forced editor error, specially when other file manipulation methods don't throw editor error on failure.
The scenario this becomes a bit annoying is when, say I needed to change encryption pass on recent builds of a game but I still need to load old ones before converting, so right now I attempt to load using old pass, fail and then try with the new pass.
### Steps to reproduce
open a file using `open_encrypted_with_pass()` with the wrong pass
### Minimal reproduction project (MRP)
N/A
Contributor guide
Research direction
Start at the open_encrypted_with_pass() entry point and inspect how a wrong password produces the editor error. Compare its behavior with get_open_error() and other file manipulation methods; done means a wrong pass returns null without an editor error while the failure reason remains available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- game-dev, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100