mirror of
https://github.com/rclone/rclone.git
synced 2025-01-29 21:04:23 +02:00
807f1cedaa
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