]> git.ipfire.org Git - thirdparty/libvirt.git/commit
util: Introduce virFileComparePaths
authorErik Skultety <eskultet@redhat.com>
Tue, 7 Feb 2017 09:19:06 +0000 (10:19 +0100)
committerErik Skultety <eskultet@redhat.com>
Fri, 10 Feb 2017 16:01:12 +0000 (17:01 +0100)
commit875894245a3fc8a065260f5eecb0232e0308e529
treeec9309704c726dd996e2ac97d284c692ed0ae31c
parent8fcf6330b683be7bf6de160cd82e5e7766be8f5c
util: Introduce virFileComparePaths

So rather than comparing 2 paths (strings) as they are, which can very
easily lead to unnecessary errors (e.g. in storage driver) that the paths
are not the same when in fact they'd be e.g. just symlinks to the same
location, we should put our best effort into resolving any symlinks and
canonicalizing the path and only then compare the 2 paths for equality.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
src/libvirt_private.syms
src/util/virfile.c
src/util/virfile.h