mirror of
https://github.com/rclone/rclone.git
synced 2025-03-14 08:25:15 +08:00
local: report error on stat in Hash in case file disappeared
This commit is contained in:
parent
ce04a073ef
commit
d0678bc3e5
@ -444,7 +444,12 @@ func (o *Object) Hash(r fs.HashType) (string, error) {
|
||||
// Check that the underlying file hasn't changed
|
||||
oldtime := o.info.ModTime()
|
||||
oldsize := o.info.Size()
|
||||
_ = o.lstat()
|
||||
err := o.lstat()
|
||||
if err != nil {
|
||||
fs.Stats.Error()
|
||||
fs.ErrorLog(o, "Failed to stat: %s", err)
|
||||
return "", err
|
||||
}
|
||||
|
||||
if !o.info.ModTime().Equal(oldtime) || oldsize != o.info.Size() {
|
||||
o.hashes = nil
|
||||
|
Loading…
x
Reference in New Issue
Block a user