Skip to content

Fix keyfile warning messages for non-critical files#2056

Closed
killerdevildog wants to merge 1 commit intoprofanity-im:masterfrom
killerdevildog:fix-keyfile-warnings-1911
Closed

Fix keyfile warning messages for non-critical files#2056
killerdevildog wants to merge 1 commit intoprofanity-im:masterfrom
killerdevildog:fix-keyfile-warnings-1911

Conversation

@killerdevildog
Copy link
Copy Markdown
Contributor

Resolves issue #1911 by suppressing unimportant warning messages for missing keyfiles that are normal to not exist during initial runs.

Changes:

  • Added load_custom_keyfile_quiet() function to src/common.h/c
  • Modified _load_keyfile() to accept suppress_missing_warnings parameter
  • Updated bookmark_ignore.c to use quiet loading for bookmark_ignore file
  • Updated tlscerts.c to use quiet loading for tlscerts file

Missing files now log as debug messages instead of warnings for:

  • ~/.local/share/profanity/bookmark_ignore
  • ~/.local/share/profanity/tlscerts

Important keyfiles still show warnings when missing to maintain proper error visibility for critical configuration files.

  • [ x] I ran valgrind when using my new feature

How to test the functionality

  • step 1
    compile with make / configure first
  • step 2
    use the command "./profanity

Resolves issue profanity-im#1911 by suppressing unimportant warning messages
for missing keyfiles that are normal to not exist during initial runs.

Changes:
- Added load_custom_keyfile_quiet() function to src/common.h/c
- Modified _load_keyfile() to accept suppress_missing_warnings parameter
- Updated bookmark_ignore.c to use quiet loading for bookmark_ignore file
- Updated tlscerts.c to use quiet loading for tlscerts file

Missing files now log as debug messages instead of warnings for:
- ~/.local/share/profanity/bookmark_ignore
- ~/.local/share/profanity/tlscerts

Important keyfiles still show warnings when missing to maintain
proper error visibility for critical configuration files.
@jubalh
Copy link
Copy Markdown
Member

jubalh commented Aug 21, 2025

We might just create those files.

sjaeckel added a commit that referenced this pull request Aug 21, 2025
Fixes #1911
Alternative to #2056

Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
@jubalh
Copy link
Copy Markdown
Member

jubalh commented Aug 21, 2025

@killerdevildog thanks for your contribution ! We chose to use another way to fix the issue. But we hope you will stay with Profanity and create more PRs :)

@jubalh jubalh closed this Aug 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants