https://issues.apache.org/bugzilla/show_bug.cgi?id=51146

             Bug #: 51146
           Summary: mtime without fractional seconds when
                    HAVE_STRUCT_STAT_ST_MTIME_N
                    apr/file_io/unix/filestat.c
           Product: Apache httpd-2
           Version: 2.2.17
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: minor
          Priority: P2
         Component: Platform
        AssignedTo: [email protected]
        ReportedBy: [email protected]
    Classification: Unclassified


I believe that the fractional part of the file mtime would be thrown away if
HAVE_STRUCT_STAT_ST_MTIME_N in fill_out_finfo(), as it is erroneously added to
finfo->ctime, which is initialized in the following line. I have no idea for
which platform/OS this might be true.

    apr_time_ansi_put(&finfo->mtime, info->st_mtime);
#ifdef HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC
    finfo->mtime += info->st_mtim.tv_nsec / APR_TIME_C(1000);
#elif defined(HAVE_STRUCT_STAT_ST_MTIMENSEC)
    finfo->mtime += info->st_mtimensec / APR_TIME_C(1000);
#elif defined(HAVE_STRUCT_STAT_ST_MTIME_N)
    finfo->ctime += info->st_mtime_n / APR_TIME_C(1000);
#endif

    apr_time_ansi_put(&finfo->ctime, info->st_ctime);

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to