Commit 1256d285 authored by Fumitoshi Ukai's avatar Fumitoshi Ukai

win: FAILED macro can't be used with HANDLE.

FAILED macro is for HRESULT, not for HANDLE.
FindFirstFile returns INVALID_HANDLE_VALUE when error or not found.
https://msdn.microsoft.com/library/windows/desktop/aa364418(v=vs.85).aspx

fixes #79
parent 03123011
......@@ -628,7 +628,7 @@ static void GetFiles(const string& pattern, vector<string>* files) {
LOG(FATAL) << "No directory separator.";
}
const string dirname = pattern.substr(0, index + 1);
if (FAILED(handle)) {
if (handle == INVALID_HANDLE_VALUE) {
// Finding no files is OK.
return;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment