Opened 16 years ago

Last modified 16 years ago

#3186 closed bug

BDirectory::Contains() is broken for certain cases of similar paths — at Initial Version

Reported by: anevilyak Owned by: axeld
Priority: normal Milestone: R1
Component: Kits/Storage Kit Version: R1/pre-alpha1
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

Steps to reproduce:

  1. Create a directory called New Folder.[BR]
  2. Create a directory called New Folder 2.[BR]
  3. Get a BDirectory object for New Folder 2, a BEntry for New Folder, and call BDirectory::Contains() on the resulting entry. It will (incorrectly) return true, because Contains currently compares the paths of the two up to the length of the directory itself. Attached please find a patch intended to fix the situation by comparing the path components individually.

Change History (0)

Note: See TracTickets for help on using tickets.