From 38f946779f570033f2af75b74d353c0589b36a56 Mon Sep 17 00:00:00 2001 From: Wilbert van de Ridder Date: Thu, 15 Aug 2019 16:22:07 +0200 Subject: [PATCH] Add src string to copyDirectory error message. Proposal to display the wrongful `src` path in the error message. For example, this error can popup in the Microk8s Kubernetes deployment dashboard. A notion of which src path is referred to would be helpful. Signed-off-by: Wilbert van de Ridder --- fs/copy.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/copy.go b/fs/copy.go index ad61022a..97053d7e 100644 --- a/fs/copy.go +++ b/fs/copy.go @@ -80,7 +80,7 @@ func copyDirectory(dst, src string, inodes map[uint64]string, o *copyDirOpts) er return errors.Wrapf(err, "failed to stat %s", src) } if !stat.IsDir() { - return errors.Errorf("source is not directory") + return errors.Errorf("source %s is not directory", src) } if st, err := os.Stat(dst); err != nil {