[PATCH] D40811: Delete temp file if rename fails

Rafael Avila de Espindola via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 5 10:38:53 PST 2017


Rafael Avila de Espindola <rafael.espindola at gmail.com> writes:

> James Henderson <jh7370.2008 at my.bristol.ac.uk> writes:
>
>> I don't know if it does or not, but I'm not sure that it needs to:
>> rename_fd fails with a permission denied error on a file marked as
>> read-only by chmod on Windows, which is presumably sufficient for this
>> case, no?
>
> Oh, interesting. I will give that a try.

Looks like chmod maps to what attrib does under the hood. I have
changed the test in r319809 to use attrib.

Let me know what you think. It is as simple as chmod, but more windows
specific.

Cheers,
Rafael



More information about the llvm-commits mailing list