I managed to replicate the problem using your instructions - thank you
I think this is a combination of two issues
- there is a design flaw in the cache backend which means it doesn't store pending directories in its internal db, only pending files
- normally this would be fine since the cache backend creates the directories immediately, however in the case of b2, you can't have empty directories on b2 which means this scheme fails.
I tested this hypothesis by adding an additional step, I created the test_dir
directory on b2 in advance by copying a file to it
rclone copyto text_file.txt b2:BUCKET/CacheBug/test_dir/keeper_file.txt
If I run your test then it works fine after that.
/
├── test_dir
│ ├── keeper_file.txt
│ └── text_file.txt
└── text_file.txt
Do you think that is correct?