<div dir="ltr">Looks good<br></div><br><div class="gmail_quote">On Fri, Apr 10, 2015 at 9:55 AM Oleksiy Vyalov <<a href="mailto:ovyalov@google.com">ovyalov@google.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Switched to use lvm::sys::fs::create_directories instead of SHCreateDirectory.<br>
Please take another look.<br>
<br>
<br>
<a href="http://reviews.llvm.org/D8977" target="_blank">http://reviews.llvm.org/D8977</a><br>
<br>
Files:<br>
source/Host/windows/FileSystem.cpp<br>
<br>
Index: source/Host/windows/FileSystem.cpp<br>
===================================================================<br>
--- source/Host/windows/FileSystem.cpp<br>
+++ source/Host/windows/FileSystem.cpp<br>
@@ -12,6 +12,7 @@<br>
#include <shellapi.h><br>
<br>
#include "lldb/Host/FileSystem.h"<br>
+#include "llvm/Support/FileSystem.h"<br>
<br>
using namespace lldb_private;<br>
<br>
@@ -27,8 +28,12 @@<br>
// On Win32, the mode parameter is ignored, as Windows files and directories support a<br>
// different permission model than POSIX.<br>
Error error;<br>
- if (!::CreateDirectory(path, NULL) && GetLastError() != ERROR_ALREADY_EXISTS)<br>
- error.SetError(::GetLastError(), lldb::eErrorTypeWin32);<br>
+ const auto err_code = llvm::sys::fs::create_directories(path, true);<br>
+ if (err_code)<br>
+ {<br>
+ error.SetErrorString(err_code.message().c_str());<br>
+ }<br>
+<br>
return error;<br>
}<br>
<br>
EMAIL PREFERENCES<br>
<a href="http://reviews.llvm.org/settings/panel/emailpreferences/" target="_blank">http://reviews.llvm.org/settings/panel/emailpreferences/</a><br>
</blockquote></div>