mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-26 16:05:48 -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))
|
||||
#endif
|
||||
{
|
||||
/* errc is meaningful only if retval is 0
|
||||
* so it is not necessary but we clean it just in case */
|
||||
/* errc output param is guaranted to be meaningful only if an error
|
||||
* happens so is not strictly necessary but we clean it anyway just
|
||||
* in case */
|
||||
errc = std::error_condition();
|
||||
return buf.st_mtime;
|
||||
}
|
||||
|
||||
errc = std::errc::io_error;
|
||||
errc = std::error_condition(errno, std::generic_category());
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue