From: Serge Hallyn Date: Mon, 21 Sep 2015 17:01:10 +0000 (+0000) Subject: lxc_rmdir_onedev: don't fail if path doesn't exist X-Git-Tag: lxc-1.0.8~38 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f72d69f63ad4218dc486f360a50169ab309a1f72;p=thirdparty%2Flxc.git lxc_rmdir_onedev: don't fail if path doesn't exist We're asked to delete it, don't fail if it doesn't exist. This stops lxc-destroy from failing when the container isn't fully built. Signed-off-by: Serge Hallyn Acked-by: Stéphane Graber --- diff --git a/src/lxc/utils.c b/src/lxc/utils.c index d6bb882d9..f10cba87b 100644 --- a/src/lxc/utils.c +++ b/src/lxc/utils.c @@ -151,6 +151,8 @@ extern int lxc_rmdir_onedev(char *path) } if (lstat(path, &mystat) < 0) { + if (errno == ENOENT) + return 0; ERROR("%s: failed to stat %s", __func__, path); return -1; }