Windows fixes

This commit is contained in:
Jack Andersen 2017-11-13 17:35:34 -10:00
parent 69e96e3b3c
commit 58ceb47b25
1 changed files with 2 additions and 2 deletions

View File

@ -116,12 +116,12 @@ public:
HANDLE fp; HANDLE fp;
ReadStream(SystemStringView path, bool& err) ReadStream(SystemStringView path, bool& err)
{ {
fp = CreateFileW(path.c_str(), GENERIC_READ, FILE_SHARE_READ, fp = CreateFileW(path.data(), GENERIC_READ, FILE_SHARE_READ,
nullptr, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, nullptr); nullptr, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, nullptr);
if (fp == INVALID_HANDLE_VALUE) if (fp == INVALID_HANDLE_VALUE)
{ {
err = true; err = true;
LogModule.report(logvisor::Error, _S("unable to open '%s' for reading"), path.c_str()); LogModule.report(logvisor::Error, _S("unable to open '%s' for reading"), path.data());
} }
} }
ReadStream(SystemStringView path, uint64_t offset, bool& err) ReadStream(SystemStringView path, uint64_t offset, bool& err)