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

Improve attachment handling by using a file watcher after you change … #11650

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

w15eacre
Copy link
Contributor

Improve attachment handling by using a file watcher after you change a file and undo that change in the KeePassXC app

This change avoids a situation where the open file has changed or an entry in the application has changed (possibly to be implemented in the future) and when you open that entry the editor shows you outdated data.

Screenshots

No UI changes

Testing strategy

I didn't find a corresponding test, so I checked manually

Type of change

  • ✅ Bug fix (non-breaking change that fixes an issue)

@w15eacre
Copy link
Contributor Author

w15eacre commented Jan 12, 2025

@droidmonkey I fixed the problem that I had found (#11637).

To reproduce the issue:

  1. Choose a text attachment.
  2. Press the "Open" button.
  3. Modify the file in an editor.
  4. Discard the changes in KeePassXC.
  5. Close the editor.
  6. Open the file again.

@xboxones1
Copy link
Contributor

@w15eacre, I found another bug: creating an attachment doesn't work on Linux.
1

@w15eacre
Copy link
Contributor Author

w15eacre commented Jan 12, 2025

This is a name validation problem, the condition is invalid.
if (validateFileName(fileName, error)) {

@droidmonkey
Copy link
Member

Whoops, that is my fault

w15dev and others added 3 commits January 12, 2025 10:56
…a file and undo that change in the KeePassXC app.

This change avoids a situation where the open file has changed or an entry in the application has changed (possibly to be implemented in the future) and when you open that entry the editor shows you outdated data.
* Fixes bug from previous attachments preview commit
@droidmonkey droidmonkey force-pushed the fix/fix_reopen_changed_files branch from eae8287 to 7062a24 Compare January 12, 2025 16:00
@droidmonkey
Copy link
Member

I fixed the logic error and the styling of preview widgets when the main window is not active or disabled

@droidmonkey droidmonkey added the pr: bugfix Pull request that fixes a bug label Jan 12, 2025
@droidmonkey droidmonkey added this to the v2.7.10 milestone Jan 12, 2025
@droidmonkey droidmonkey self-requested a review January 12, 2025 16:01
@w15eacre
Copy link
Contributor Author

I did some refactoring to improve readability.

@w15eacre
Copy link
Contributor Author

@droidmonkey If you are unsure about the changes, I can do further verification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: bugfix Pull request that fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants