mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-27 00:15:51 -04:00
Improve RsDirUtil::lastWriteTime error reporting
This commit is contained in:
parent
9970f9d22f
commit
817a961013
1 changed files with 4 additions and 3 deletions
|
@ -458,13 +458,14 @@ rstime_t RsDirUtil::lastWriteTime(
|
||||||
if ( 0 == stat64(path.c_str(), &buf))
|
if ( 0 == stat64(path.c_str(), &buf))
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
/* errc is meaningful only if retval is 0
|
/* errc output param is guaranted to be meaningful only if an error
|
||||||
* so it is not necessary but we clean it just in case */
|
* happens so is not strictly necessary but we clean it anyway just
|
||||||
|
* in case */
|
||||||
errc = std::error_condition();
|
errc = std::error_condition();
|
||||||
return buf.st_mtime;
|
return buf.st_mtime;
|
||||||
}
|
}
|
||||||
|
|
||||||
errc = std::errc::io_error;
|
errc = std::error_condition(errno, std::generic_category());
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue