Opened 15 years ago

Last modified 15 years ago

#3186 closed bug

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

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 (last modified by anevilyak)

Steps to reproduce:

  1. Create a directory called New Folder.
  2. Create a directory called New Folder 2.
  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 (1)

comment:1 by anevilyak, 15 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.