Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

touch: improve error message from recursive touch

albertonya70c20fe6b30
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)
}
}
})