mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-07-16 12:42:30 +00:00
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 <serge.hallyn@ubuntu.com> Acked-by: Stéphane Graber <stgraber@ubuntu.com>
This commit is contained in:
parent
776d170c5e
commit
067650d0b6
@ -197,6 +197,8 @@ extern int lxc_rmdir_onedev(char *path, const char *exclude)
|
||||
}
|
||||
|
||||
if (lstat(path, &mystat) < 0) {
|
||||
if (errno == ENOENT)
|
||||
return 0;
|
||||
ERROR("%s: failed to stat %s", __func__, path);
|
||||
return -1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user