make-w32
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: directory caching anomalies in win32


From: Aaron Shatters
Subject: Re: directory caching anomalies in win32
Date: Mon, 23 Apr 2007 07:45:03 -0700 (PDT)

>> Date: Fri, 20 Apr 2007 13:53:31 -0700 (PDT)
>> From: Aaron Shatters <address@hidden>
>> 
>> What was the reason for rehashing the directory contents for windows if the 
>> file was not found in the directory cache and the directory has been 
>> modified... but not on any other platforms?
>
>Could you please point to the code fragment(s) where you see this
>difference?

In dir.c -->

  if (dir->dirstream == 0)
  {
#ifdef WINDOWS32
    /*
     * Check to see if directory has changed since last read. FAT
     * filesystems force a rehash always as mtime does not change
     * on directories (ugh!).
     */
     if (dir->path_key)
     {
       if ((dir->fs_flags & FS_FAT) != 0)
       {
         dir->mtime = time ((time_t *) 0);
         rehash = 1;
       }
       else if (stat(dir->path_key, &st) == 0 && st.st_mtime > dir->mtime)
       {
         /* reset date stamp to show most recent re-process.  */
         dir->mtime = st.st_mtime;
         rehash = 1;
       }
       /* If it has been already read in, all done.  */
       if (!rehash)
         return 0;
       /* make sure directory can still be opened; if not return.  */
       dir->dirstream = opendir(dir->path_key);
       if (!dir->dirstream)
         return 0;
     }
     else
#endif
    /* The directory has been all read in.  */
    return 0;
  }

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]