From 930e729ff7705532bf0248ec0c35017dbd8fbd9c Mon Sep 17 00:00:00 2001 From: liuhao Date: Tue, 22 Jan 2019 14:45:54 +0800 Subject: [PATCH 053/139] 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 c8fb993..24e975b 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; } -- 1.8.3.1