apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bnicho...@apache.org
Subject cvs commit: apr/file_io/netware filestat.c
Date Thu, 14 Mar 2002 16:52:58 GMT
bnicholes    02/03/14 08:52:58

  Modified:    file_io/netware filestat.c
  Log:
  Updated to match the changes that occured in the stat structure
  
  Revision  Changes    Path
  1.6       +15 -5     apr/file_io/netware/filestat.c
  
  Index: filestat.c
  ===================================================================
  RCS file: /home/cvs/apr/file_io/netware/filestat.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- filestat.c	13 Mar 2002 20:39:10 -0000	1.5
  +++ filestat.c	14 Mar 2002 16:52:58 -0000	1.6
  @@ -95,9 +95,9 @@
       finfo->inode = info->st_ino;
       finfo->device = info->st_dev;
       finfo->nlink = info->st_nlink;
  -    apr_time_ansi_put(&finfo->atime, info->st_atime);
  -    apr_time_ansi_put(&finfo->mtime, info->st_mtime);
  -    apr_time_ansi_put(&finfo->ctime, info->st_ctime);
  +    apr_time_ansi_put(&finfo->atime, info->st_atime.tv_sec);
  +    apr_time_ansi_put(&finfo->mtime, info->st_mtime.tv_sec);
  +    apr_time_ansi_put(&finfo->ctime, info->st_ctime.tv_sec);
       /* ### needs to be revisited  
        * if (wanted & APR_FINFO_CSIZE) {
        *   finfo->csize = info->st_blocks * 512;
  @@ -106,6 +106,12 @@
        */
   }
   
  +char *case_filename(apr_pool_t *pPool, const char *szFile)
  +{
  +    return (char*)szFile;
  +}
  +
  +
   APR_DECLARE(apr_status_t) apr_file_info_get(apr_finfo_t *finfo, 
                                               apr_int32_t wanted,
                                               apr_file_t *thefile)
  @@ -286,6 +292,7 @@
   {
       struct stat info;
       int srv;
  +    char *s;
   
       srv = cstat(fname, &info);
   
  @@ -296,8 +303,11 @@
           if (wanted & APR_FINFO_LINK)
               wanted &= ~APR_FINFO_LINK;
           if (wanted & APR_FINFO_NAME) {
  -            finfo->name = apr_pstrdup(cont, info.st_name);
  -            finfo->valid |= APR_FINFO_NAME;
  +            s = strrchr(case_filename(cont, fname), '/');
  +            if (s) {
  +                finfo->name = apr_pstrdup(cont, &s[1]);
  +                finfo->valid |= APR_FINFO_NAME;
  +            }
           }
           return (wanted & ~finfo->valid) ? APR_INCOMPLETE : APR_SUCCESS;
       }
  
  
  

Mime
View raw message