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

Merged

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

@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.

@w15eacre w15eacre force-pushed the fix/fix_reopen_changed_files branch from 97892d1 to 278acc3 Compare January 30, 2025 18:18
@droidmonkey
Copy link
Member

I don't have problems just no time as of late

w15dev and others added 5 commits February 1, 2025 06: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 278acc3 to ba07d36 Compare February 1, 2025 12:09
Copy link
Member

@droidmonkey droidmonkey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to go, I also put in some logic fixes if there are errors but errorMessage is nullptr.

@droidmonkey droidmonkey merged commit 5ee5e49 into keepassxreboot:develop Feb 1, 2025
11 checks passed
@droidmonkey droidmonkey added the pr: backported Pull request backported to previous release label Feb 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: backported Pull request backported to previous release pr: bugfix Pull request that fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants