diff options
author | John Ferlan <jferlan@redhat.com> | 2015-09-15 16:33:36 -0400 |
---|---|---|
committer | John Ferlan <jferlan@redhat.com> | 2015-09-16 11:23:16 -0400 |
commit | b421a70811b15a2d1853ee7e47069fdef83f7f22 (patch) | |
tree | c180531b63f7f9378281127a4ed42f15465ecc88 /tests/virhostdevtest.c | |
parent | 41d4104d3ee52e1caea3340129141cf82971942f (diff) | |
download | libvirt-b421a70811b15a2d1853ee7e47069fdef83f7f22.tar.gz |
virfile: Check for existence of dir in virFileDeleteTree
Commit id 'f1f68ca33' added code to remove the directory paths for
auto-generated sockets, but that code could be called before the
paths were created resulting in generating error messages from
virFileDeleteTree indicating that the file doesn't exist.
Rather than "enforce" all callers to make the non-NULL and existence
checks, modify the virFileDeleteTree API to silently ignore NULL on
input and non-existent directory trees.
Diffstat (limited to 'tests/virhostdevtest.c')
-rw-r--r-- | tests/virhostdevtest.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/virhostdevtest.c b/tests/virhostdevtest.c index 1e93819ce7..065b825a55 100644 --- a/tests/virhostdevtest.c +++ b/tests/virhostdevtest.c @@ -65,7 +65,7 @@ myCleanup(void) } if (mgr) { - if (mgr->stateDir && !getenv("LIBVIRT_SKIP_CLEANUP")) + if (!getenv("LIBVIRT_SKIP_CLEANUP")) virFileDeleteTree(mgr->stateDir); virObjectUnref(mgr->activePCIHostdevs); |