Backup failing because of left over previous backup directory / files

Operating system

Windows

Joplin version

3.6.15

Desktop version info

Joplin 3.6.15 (prod, win32)

Device: win32, 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz
Client ID: 4d1b254ac92a463fb86a75091f82928d
Sync Version: 3
Profile Version: 49
Keychain Supported: Yes
Alternative instance ID: -
Sync target: OneDrive
Editor: Rich Text

Revision: c615726

Backup: 1.5.1
Freehand Drawing: 4.3.0
Note Statistics: 1.0.4

Sync target

File system

What issue do you have?

Sometimes a backup will fail because the previous temporary active backup directory does not get deleted.

Now I believe it is caused by things like Google Drive / OneDrive / Proton Drive trying to sync this temporary directory and marking the files as being in use so the directory does not get deleted when the Joplin backup finishes.

Now I know you could say that it is not Joplin's fault but no other software I have suffers from this.

I don't think this is an actual bug but more the way Joplin works.