From a70c20fe6b30151d66f5d634c49bf0fa93dabf38 Mon Sep 17 00:00:00 2001 From: albertony <12441419+albertony@users.noreply.github.com> Date: Thu, 21 Oct 2021 17:32:28 +0200 Subject: [PATCH] touch: improve error message from recursive touch --- fs/operations/operations.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/operations/operations.go b/fs/operations/operations.go index 98a13cc62..c6f9aa355 100644 --- a/fs/operations/operations.go +++ b/fs/operations/operations.go @@ -1914,8 +1914,9 @@ func TouchDir(ctx context.Context, f fs.Fs, t time.Time, recursive bool) error { fs.Debugf(f, "Touching %q", o.Remote()) err := o.SetModTime(ctx, t) if err != nil { + err = errors.Wrap(err, "failed to touch") err = fs.CountError(err) - fs.Errorf(o, "Failed to touch %v", err) + fs.Errorf(o, "%v", err) } } })