forked from TrueCloudLab/rclone
googlephotos: fix "concurrent map write" error - fixes #4003
This adds a bit of missed locking around the uploaded info to fix the concurrent map write. All the other accesses have locking - this one must have got missed.
This commit is contained in:
parent
452fdbf1c1
commit
4d8d1e287b
1 changed files with 2 additions and 0 deletions
|
@ -1003,7 +1003,9 @@ func (o *Object) Update(ctx context.Context, in io.Reader, src fs.ObjectInfo, op
|
|||
|
||||
// Add upload to internal storage
|
||||
if pattern.isUpload {
|
||||
o.fs.uploadedMu.Lock()
|
||||
o.fs.uploaded.AddEntry(o)
|
||||
o.fs.uploadedMu.Unlock()
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue