rclone/backend/hasher
Nick Craig-Wood 807f1cedaa hasher: fix crash on object not found
Before this fix `NewObject` could return a wrapped `fs.Object(nil)`
which caused a crash. This was caused by `wrapObject` returning a
`nil` `*Object` which was cast into an `fs.Object`.

This changes the interface of `wrapObject` so it returns an
`fs.Object` instead of a `*Object` and an error which must be checked.
This forces the callers to return a `nil` object rather than an
`fs.Object(nil)`.

See: https://forum.rclone.org/t/panic-in-hasher-when-mounting-with-vfs-cache-and-not-synced-data-in-the-cache/29697/11
2022-03-16 11:30:26 +00:00
..
commands.go Remove github.com/pkg/errors and replace with std library version 2021-11-07 11:53:30 +00:00
hasher.go hasher: fix crash on object not found 2022-03-16 11:30:26 +00:00
hasher_internal_test.go hasher: add hasher backend #5587 2021-10-20 19:11:54 +03:00
hasher_test.go hasher: add hasher backend #5587 2021-10-20 19:11:54 +03:00
kv.go hashsum: support creating hash from data received on stdin 2021-11-11 15:16:45 +01:00
object.go hasher: fix crash on object not found 2022-03-16 11:30:26 +00:00