This is an alternative that involves a smaller code difference for regular and non regular files.
Details
Diff Detail
Event Timeline
LGTM with this fix.
lib/Support/FileOutputBuffer.cpp | ||
---|---|---|
128 | I think I now understand why we had this code in the first place, and I believe we want to call this for both IsRegular and !IsRegular. Once we are done with a temporary file, we rename or remove the temporary file, so the path will become nonexistent. After that, we don't want to try to remove that path, because it is useless, and sometimes harmful, if other process happens to use the same temporary filename. |
Remove else.