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
Priority:  5 - 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

Post a Comment

Add a New Comment Rich Markup
   

Discussion

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>

 

Attached Files

This item currently has no attached files.

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

Attach Files:
   
   
Comment:
   

 

Dependencies

This item does not depend on any other items.

No items depend on this one.

 

Mail Notification Carbon-Copy List

 

Votes

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.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

History

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.16-2753.
Corresponding source code