<div dir="ltr"><div>FILE_SHARE_DELETE is for being able to request a file to be deleted when it's closed, which is too late, right?<br></div><div><br></div>I didn't write the code in Path.inc, but from what I understand you can't generally overwrite a file that's still open on Windows, and Path.inc tries to work around this -- but the workaround apparently causes the system to leak temp files.<div><br></div><div>rnk will know more about this :-)</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 27, 2017 at 10:10 AM, Manuel Klimek via Phabricator <span dir="ltr"><<a href="mailto:reviews@reviews.llvm.org" target="_blank">reviews@reviews.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">klimek added a comment.<br>
<br>
Also, do we want to not call ReplaceFile in Path.inc on Win if it potentially leaves temp files lying around?<br>
Reading the code, it looks like we currently actually believe it may fail, and retry with MoveFileEx afterwards...<br>
<br>
<br>
<a href="https://reviews.llvm.org/D30385" rel="noreferrer" target="_blank">https://reviews.llvm.org/<wbr>D30385</a><br>
<br>
<br>
<br>
</blockquote></div><br></div>