[BACK]Return to find.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / find

Diff for /src/usr.bin/find/find.c between version 1.5 and 1.6

version 1.5, 1997/06/30 23:54:07 version 1.6, 1999/10/03 19:07:35
Line 163 
Line 163 
                 err(1, "ftsopen");                  err(1, "ftsopen");
   
         while ((entry = fts_read(tree))) {          while ((entry = fts_read(tree))) {
                 switch(entry->fts_info) {                  switch (entry->fts_info) {
                 case FTS_D:                  case FTS_D:
                         if (isdepth)                          if (isdepth)
                                 continue;                                  continue;
Line 185 
Line 185 
                         warnx("%s: illegal path", entry->fts_path);                          warnx("%s: illegal path", entry->fts_path);
                         continue;                          continue;
                 }                  }
   
                   /*
                    * Since fts does not chdir for the root node we
                    * have to do this ourselves to make -execdir work.
                    */
                   if (entry->fts_level == FTS_ROOTLEVEL)
                           chdir(entry->fts_accpath);
   
                 /*                  /*
                  * call all the functions in the execution plan until one is                   * Call all the functions in the execution plan until one is
                  * false or all have been executed.  This is where we do all                   * false or all have been executed.  This is where we do all
                  * the work specified by the user on the command line.                   * the work specified by the user on the command line.
                  */                   */
                 for (p = plan; p && (p->eval)(p, entry); p = p->next);                  for (p = plan; p && (p->eval)(p, entry); p = p->next)
                       ;
   
                   /* Undo the chdir above to make fts happy. */
                   if (entry->fts_level == FTS_ROOTLEVEL)
                           fchdir(tree->fts_rfd);
         }          }
         (void)fts_close(tree);          (void)fts_close(tree);
 }  }

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6