From 814e6298692f74480fcd807eedc1588b94b3f961 Mon Sep 17 00:00:00 2001 From: liuhao Date: Tue, 22 Jan 2019 14:45:54 +0800 Subject: [PATCH 053/131] destroy empty cgroup path return ture destroy empty cgroup path return ture Signed-off-by: liuhao Signed-off-by: LiFeng --- src/lxc/utils.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lxc/utils.c b/src/lxc/utils.c index c8fb9931..24e975bc 100644 --- a/src/lxc/utils.c +++ b/src/lxc/utils.c @@ -1776,6 +1776,10 @@ int recursive_destroy(char *dirname) dir = opendir(dirname); if (!dir) { + if (errno == ENOENT) { + WARN("Destroy path: %s do not exist"); + return 0; + } SYSERROR("Failed to open dir \"%s\"", dirname); return -1; } -- 2.23.0