Skip to content

Ignore relative paths on Unix for data dir (i.e. ./share/keepassxc) #12809

@stoeckmann

Description

@stoeckmann

Have you searched for an existing issue?

  • Yes, I tried searching and reviewed the pinned issues

Brief Summary

KeePassXC takes a share/keepassxc in current working directory into account before checking for system paths. This happens only on Unix (non-macOS) systems due to this line:

trySetResourceDir(KEEPASSX_DATA_DIR) || trySetResourceDir(QString("%1/../%2").arg(appDirPath, KEEPASSX_DATA_DIR))

This has effects on offline documentation but also system word lists in passphrase generator and could lead to unexpected results.

Steps to Reproduce

  1. Open a terminal on a Linux machine
  2. Create a local user guide file, e.g. mkdir -p share/keepassxc/docs; echo hi > share/keepassxc/docs/KeePassXC_UserGuide.html
  3. Run keepassxc in same working directory
  4. Click Help -> User Guide

You will see hi in your browser instead of the expected user guide. Also, please note that KeePassXC also complains about missing translations and unparseable word list on stdout.

Expected Versus Actual Behavior

I would expect that all systems (Linux, Windows, macOS) behave the same and definitely use the system directories, not something found in current working directory

KeePassXC Debug Information

KeePassXC - Version 2.7.10
Revision: b342be4

Qt 5.15.15
Debugging mode is disabled.

Operating system: Tails
CPU architecture: x86_64
Kernel: linux 6.12.57+deb13-amd64

Enabled extensions:
- Auto-Type
- YubiKey

Cryptographic libraries:
- Botan 2.19.5

Operating System

Linux

Linux Desktop Environment

Gnome

Linux Windowing System

Wayland

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions