if (CreateHardLinkW(new_hard_link.c_str(), to.c_str(), NULL))
ec.clear();
else
- ec.assign((int)GetLastError(), generic_category());
+ ec.assign((int)GetLastError(), system_category());
#else
ec = std::make_error_code(std::errc::not_supported);
#endif
if (!h1 || !h2)
{
if (!h1 && !h2)
- ec.assign((int)GetLastError(), generic_category());
+ ec.assign((int)GetLastError(), system_category());
return false;
}
if (!h1.get_info() || !h2.get_info())
{
- ec.assign((int)GetLastError(), generic_category());
+ ec.assign((int)GetLastError(), system_category());
return false;
}
return h1.info.dwVolumeSerialNumber == h2.info.dwVolumeSerialNumber
return true;
}
else if (!ec)
- ec.assign((int)GetLastError(), generic_category());
+ ec.assign((int)GetLastError(), system_category());
}
else if (status_known(st))
ec.clear();
if (CreateHardLinkW(new_hard_link.c_str(), to.c_str(), NULL))
ec.clear();
else
- ec.assign((int)GetLastError(), generic_category());
+ ec.assign((int)GetLastError(), system_category());
#else
ec = std::make_error_code(std::errc::not_supported);
#endif
return true;
}
else if (!ec)
- ec.assign((int)GetLastError(), generic_category());
+ ec.assign((int)GetLastError(), system_category());
}
else if (status_known(st))
ec.clear();