[PATCH] D50048: [Windows FS] Fall back to MoveFileEx for rename across volumes

Jeremy Morse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 1 03:57:45 PDT 2018


jmorse added a comment.

In https://reviews.llvm.org/D50048#1183136, @pcc wrote:

> But if we change the TempFile API so that it always creates the temporary in the same directory as the destination, that becomes a non-problem, no?


My understanding of the TempFile API is that it might not know whether a file is kept or the destination it might be kept to, at the time of creation.

IMHO, this comes down the support code not currently providing a "move", hence this patch. However with this patch unix-rename and windows-rename might behave differently.

The more technically consistent solution could be to mirror Jonas' cross-device copy in https://reviews.llvm.org/D49860 TempFile::keep for Windows. The problem is then just code duplication (and a lack of "move"), rather than functions behaving differently.

I'll upload a patch that does that in a moment to demonstrate.


Repository:
  rL LLVM

https://reviews.llvm.org/D50048





More information about the llvm-commits mailing list