[libcxx-commits] [PATCH] D91172: [17/N] [libcxx] Implement the read_symlink function for windows

Martin Storsjö via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Nov 10 09:02:25 PST 2020


mstorsjo added a comment.

FWIW, after this patch, it should compile successfully for windows, the later patches only fix remaining behaviours.



================
Comment at: libcxx/src/filesystem/operations.cpp:1423
+  detail::WinHandle h(p.c_str(), FILE_READ_ATTRIBUTES,
+                      FILE_FLAG_OPEN_REPARSE_POINT);
+  if (!h)
----------------
compnerd wrote:
> You should use backup semantics here to ensure that directories can be read.
This does use backup semantics; see https://reviews.llvm.org/D91141 for the implementation of the WinHandle helper. The flag `FILE_FLAG_BACKUP_SEMANTICS` is always included, to keep the calling code terse here.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D91172



More information about the libcxx-commits mailing list