[lxc-devel] [lxd/master] lxd/storage/dir: Don't hide error message
stgraber on Github
lxc-bot at linuxcontainers.org
Tue Sep 10 12:43:29 UTC 2019
A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 354 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20190910/68ecb806/attachment.bin>
-------------- next part --------------
From 4375c825b08d568e9a8ba4c0f8abab31cb509a17 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber at ubuntu.com>
Date: Tue, 10 Sep 2019 13:42:22 +0100
Subject: [PATCH] lxd/storage/dir: Don't hide error message
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Stéphane Graber <stgraber at ubuntu.com>
---
lxd/storage_dir.go | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lxd/storage_dir.go b/lxd/storage_dir.go
index 3c38cedcfd..cc97c104c9 100644
--- a/lxd/storage_dir.go
+++ b/lxd/storage_dir.go
@@ -613,9 +613,9 @@ func (s *storageDir) ContainerDelete(container container) error {
err := os.RemoveAll(containerMntPoint)
if err != nil {
// RemovaAll fails on very long paths, so attempt an rm -Rf
- output, err := shared.RunCommand("rm", "-Rf", containerMntPoint)
+ _, err := shared.RunCommand("rm", "-Rf", containerMntPoint)
if err != nil {
- return fmt.Errorf("error removing %s: %s", containerMntPoint, output)
+ return fmt.Errorf("error removing %s: %s", containerMntPoint, err)
}
}
}
More information about the lxc-devel
mailing list