distrobox icon indicating copy to clipboard operation
distrobox copied to clipboard

Fix: Correct file path resolution for symlinks in NixOS

Open lesserfish opened this issue 6 months ago • 1 comments

The issue happens in NixOS, where the file /etc/hostname is a symlink to /etc/static/hostname which is itself another symlink to a file in /nix/store.

This causes the variable file_watch_src to be set to an incorrect path.

By using 'readlink -f', we can ensure that file_watch_src points to the correct file location describing the hostname.

This change ensures that the path resolution works correctly for both regular files and symlinks.

This issues was described in #1482

lesserfish avatar Aug 03 '24 19:08 lesserfish