fix(config): detect symlinked config paths as same file
On Fedora Atomic Desktops (Silverblue, Kinoite, etc.), /home is a symlink to /var/home. This caused a false positive duplicate config warning:
Warning: Multiple config files found. Only the first one will be used.
Using: /var/home/user/.config/glab-cli/config.yml
Ignoring: /home/user/.config/glab-cli/config.yml
The paths resolve to the same file, but string comparison treated them as different.
Setting XDG_CONFIG_HOME does not help as a workaround because the
legacy config path check uses os.UserHomeDir() independently from
the XDG library. The two mechanisms can resolve home directory paths
differently when symlinks are involved.
Fix this by using os.SameFile() to compare files at the inode/device
level, which correctly identifies symlinked paths pointing to the
same file.
Assisted-by: Claude Code
Edited by Miroslav Vadkerti