<p>I'm currently working on this.</p>
<p>Very interestingly, Windows actually has an "oplock" (opportunistic lock) API that virus scanners/etc can use to access files without preventing other programs from deleting or opening those files with desired access modes (however, I'm not 100% sure whether that includes renaming): <a href="https://devblogs.microsoft.com/oldnewthing/?p=4663" rel="nofollow">https://devblogs.microsoft.com/oldnewthing/?p=4663</a><br>
When a program tries to access the file it waits and whoever holds the oplock is signalled and given a chance to clean up and let go of their handle.<br>
So as Raymond says, any virus scanner that breaks programs by interfering with deletion or rename is "not well-written" (i.e. buggy). That doesn't change the fact that we need to work around their bugginess.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/ohrrpgce/ohrrpgce/issues/36?email_source=notifications&email_token=AMWGWZT34WM4EDIWK342E2TQ232CLA5CNFSM4IPH2SQ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHYD5YQ#issuecomment-569392866">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AMWGWZTCDVPJF3FML5B57S3Q232CLANCNFSM4IPH2SQQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AMWGWZU3TRMAIVI3MVKAVU3Q232CLA5CNFSM4IPH2SQ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHYD5YQ.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/ohrrpgce/ohrrpgce/issues/36?email_source=notifications\u0026email_token=AMWGWZT34WM4EDIWK342E2TQ232CLA5CNFSM4IPH2SQ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHYD5YQ#issuecomment-569392866",
"url": "https://github.com/ohrrpgce/ohrrpgce/issues/36?email_source=notifications\u0026email_token=AMWGWZT34WM4EDIWK342E2TQ232CLA5CNFSM4IPH2SQ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHYD5YQ#issuecomment-569392866",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>