bugGNUstep - Bugs: bug #38450, -[NSFileManager...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #38450: -[NSFileManager contentsEqualAtPath:andPath:] gives incorrect results for directories

Submitted by:  Larry Campbell <lcampbel>
Submitted on:  Fri 01 Mar 2013 03:45:02 PM UTC  
 
Category: Base/FoundationSeverity: 3 - Normal
Item Group: BugStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

Tue 05 Mar 2013 03:09:41 PM UTC, comment #2:

Thanks ... I applied that fix.

Richard Frith-Macdonald <CaS>
Project Member
Fri 01 Mar 2013 03:45:58 PM UTC, comment #1:

The fix is simple:

      • NSFileManager.m.orig Fri Mar 1 10:37:53 2013

--- NSFileManager.m Fri Mar 1 10:39:28 2013
***************

      • 677,683 ****

{
ok = NO;
}
! else if ([t isEqual: NSFileTypeDirectory])
{
ok = [self contentsEqualAtPath: p1 andPath: p2];
}
--- 677,683 ----
{
ok = NO;
}
! else if ([t isEqual: NSFileTypeDirectory] || [t isEqual: NSFileTypeRegular])
{
ok = [self contentsEqualAtPath: p1 andPath: p2];
}

Larry Campbell <lcampbel>
Fri 01 Mar 2013 03:45:02 PM UTC, original submission:

This method is supposed to compare two paths; if they're directories, it's supposed to recurse into them. It works for plain files, but for directories, it doesn't actually compare the contents of the items in the directories, just their names and file types.

Larry Campbell <lcampbel>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by CaS (Posted a comment)
  • -unavailable- added by lcampbel (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

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

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 05 Mar 2013 03:09:41 PM UTCCaSStatusNone=>Fixed
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1