mirror of
https://github.com/rclone/rclone.git
synced 2024-11-22 16:34:30 +01:00
vfs: Fix race condition in vfscache
This commit is contained in:
parent
5db15cb157
commit
530dc77cde
@ -488,8 +488,9 @@ func (item *Item) _store(ctx context.Context, storeFn StoreFn) (err error) {
|
|||||||
|
|
||||||
// Object has disappeared if cacheObj == nil
|
// Object has disappeared if cacheObj == nil
|
||||||
if cacheObj != nil {
|
if cacheObj != nil {
|
||||||
|
o, name := item.o, item.name
|
||||||
item.mu.Unlock()
|
item.mu.Unlock()
|
||||||
o, err := operations.Copy(ctx, item.c.fremote, item.o, item.name, cacheObj)
|
o, err := operations.Copy(ctx, item.c.fremote, o, name, cacheObj)
|
||||||
item.mu.Lock()
|
item.mu.Lock()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return errors.Wrap(err, "vfs cache: failed to transfer file from cache to remote")
|
return errors.Wrap(err, "vfs cache: failed to transfer file from cache to remote")
|
||||||
|
Loading…
Reference in New Issue
Block a user