]> git.ipfire.org Git - thirdparty/systemd.git/commit
delta: extend skip logic to work on full directory paths (prefix+suffix)
authorFranck Bui <fbui@suse.com>
Mon, 4 Dec 2017 08:36:22 +0000 (09:36 +0100)
committerFranck Bui <fbui@suse.com>
Mon, 4 Dec 2017 11:43:21 +0000 (12:43 +0100)
commit4cc893e742d0e4f0e29f383f0a29f44ef0a2e7b8
tree1ba383d905ecf1b4004306e5b2b883d78a76884a
parent7ddc01a5e03ccb068382aa1df9934591ec9824fb
delta: extend skip logic to work on full directory paths (prefix+suffix)

Rather than only checking that a prefix path is a symlink to another prefix
path (this can happen with split-usr=true and /lib a symlink to /usr/lib),
extend the logic in should_skip_prefix() so that the check is done on the full
directory path (prefix + suffix).

This allows to catch such cases as well:

 # ls -ld /lib /lib/udev
 drwxr-xr-x 1 root root 86 Nov 22 13:14 /lib
 lrwxrwxrwx 1 root root 13 Sep  4 17:47 /lib/udev -> /usr/lib/udev

where prefix=/lib and suffix=udev/rules.d
src/delta/delta.c