[libcxx-commits] [PATCH] D91175: [19/N] [libcxx] Fix the fallback case in temp_directory_path for windows

Martin Storsjö via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Nov 10 10:57:24 PST 2020


mstorsjo added inline comments.


================
Comment at: libcxx/src/filesystem/operations.cpp:1599
+#if defined(_LIBCPP_WIN32API)
+    ret = "c:\\windows";
+#else
----------------
compnerd wrote:
> What do you think of using `GetTempPath` instead?  That is more likely to be writable.
That's also an option - or we could skip our own code and just use that one. That function does essentially the same, checks a few env vars (two of the ones checked here, plus USERPROFILE). But if none of the env vars are available, GetTempPath also falls back to c:\windows - that's where I got the idea.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D91175



More information about the libcxx-commits mailing list