Skip to content

Commit

Permalink
Fixup 37225d2 (unused parameter when not building on Windows)
Browse files Browse the repository at this point in the history
  • Loading branch information
Vultraz authored and GregoryLundberg committed Nov 30, 2017
1 parent 5d599a5 commit 6d88655
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/filesystem_boost.cpp
Expand Up @@ -193,11 +193,9 @@ namespace {

typedef DWORD(WINAPI *GetFinalPathNameByHandleWPtr)(HANDLE, LPWSTR, DWORD, DWORD);
static GetFinalPathNameByHandleWPtr dyn_GetFinalPathNameByHandle;
#endif

bool is_filename_case_correct(const std::string& fname, const boost::iostreams::file_descriptor_source& fd)
{
#ifdef _WIN32
if(dyn_GetFinalPathNameByHandle == nullptr) {
// Windows XP. Just assume that the case is correct.
return true;
Expand All @@ -207,10 +205,14 @@ namespace {
dyn_GetFinalPathNameByHandle(fd.handle(), real_path, MAX_PATH - 1, VOLUME_NAME_NONE);
std::string real_name = filesystem::base_name(unicode_cast<std::string>(std::wstring(real_path)));
return real_name == filesystem::base_name(fname);
}

#else
bool is_filename_case_correct(const std::string& /*fname*/, const boost::iostreams::file_descriptor_source& /*fd*/)
{
return true;
#endif
}
#endif
}


Expand Down

0 comments on commit 6d88655

Please sign in to comment.