bugfindutils - Bugs: bug #11715, -xtype and %Y broken

 
 

bug #11715: -xtype and %Y broken

Submitter:  Andreas Schwab <schwab>
Submitted:  Mon 24 Jan 2005 01:11:40 PM UTC
   
 
Category:  find Severity:  3 - Normal
Item Group:  Wrong result Status:  Fixed
Privacy:  Public Assigned to:  jay
Originator Name:  Open/Closed:  Closed
Release:  4.2.13 Fixed Release:  4.2.14
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 24 Jan 2005 04:52:20 PM UTC, comment #1: 

Fixed, but rather than adopt the approach above, I made following_links() global to ensure that we handle the case where we are running apply_predicates() on a command-line argument (i.e viz. the distinction between -H and -P).

James Youngman <jay>
Group administrator
Mon 24 Jan 2005 01:11:40 PM UTC, original submission:  

--- find/pred.c
+++ find/pred.c
@@ -841,7 +841,16 @@
      {
        struct stat sbuf;
        int (*ystat) ();
-       ystat = options.xstat == lstat ? stat : lstat;
+
+       switch (options.symlink_handling)
+ {
+ case SYMLINK_ALWAYS_DEREF:
+   ystat = optionp_stat;
+ case SYMLINK_DEREF_ARGSONLY:
+ case SYMLINK_NEVER_DEREF:
+   ystat = optionl_stat;
+ }

        if ((*ystat) (state.rel_pathname, &sbuf) != 0)
        {
  if ( errno == ENOENT ) {
@@ -1474,10 +1483,10 @@
   switch (options.symlink_handling)
     {
     case SYMLINK_ALWAYS_DEREF:
-      ystat = optionl_stat;
+      ystat = optionp_stat;
     case SYMLINK_DEREF_ARGSONLY:
     case SYMLINK_NEVER_DEREF:
-      ystat = optionp_stat;
+      ystat = optionl_stat;
     }
  
   if ((*ystat) (state.rel_pathname, &sbuf) != 0)

Andreas Schwab <schwab>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

Only logged-in users can vote.

 

Follow 4 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2005-01-25 jay Open/ClosedOpen Closed
    Fixed ReleaseNone 4.2.14
2005-01-24 jay StatusNone Fixed
    Assigned toNone jay

Back to the top

Powered by Savane 3.13-f8d8.
Corresponding source code