[PATCH] D111875: [Support] [Windows] Manually clean up temp files on network shares

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 18 12:57:38 PDT 2021


rnk added a comment.

Here's an idea to try to make this a bit cleaner. Maybe `setDeleteDisposition` should return an error code when the path is on a network drive. That return value would be propagated back up to the caller who sets `OF_Delete`. In this case, that is `TempFile::create`. At that point, TempFile can retry temporary file creation without `OF_Delete`.

The downside to this is that we will create the file, set the disposition (fails), delete the file, and recreate it again without `OF_Delete`. To improve on that, we could have some kind of `canSetDeleteDisposition` portable API, which would feed into the choice to set the `OF_Delete` flag.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D111875/new/

https://reviews.llvm.org/D111875



More information about the llvm-commits mailing list