Bug 107605 - [osgi] Bundle.findEntries does not find directory entries in the root of a bundle
Summary: [osgi] Bundle.findEntries does not find directory entries in the root of a bu...
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Runtime (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1.1   Edit
Assignee: Thomas Watson CLA Friend
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-22 10:27 EDT by Thomas Watson CLA Friend
Modified: 2005-08-22 17:50 EDT (History)
1 user (show)

See Also:


Attachments
Proposed fix for 3.1.1 (1.04 KB, patch)
2005-08-22 10:42 EDT, Thomas Watson CLA Friend
no flags Details | Diff
Proposed fix for 3.1.1 (2.05 KB, patch)
2005-08-22 16:12 EDT, Thomas Watson CLA Friend
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Watson CLA Friend 2005-08-22 10:27:54 EDT
If a bundle has a root directory "foo/" then the following call should return 
an enumeration containing a URL to that directory:

Enumeration fooDirs = bundle.findEntries("/", "foo/", false);

Currently null is returned because the code incorrectly substrings the 
matching string "foo/" at the last '/' char.
Comment 1 Thomas Watson CLA Friend 2005-08-22 10:40:48 EDT
Fixed in head.  Will attach a patch for 3.1.1.
Comment 2 Thomas Watson CLA Friend 2005-08-22 10:42:10 EDT
Created attachment 26337 [details]
Proposed fix for 3.1.1

Pascal, please review for 3.1.1, thanks.
Comment 3 Thomas Watson CLA Friend 2005-08-22 16:12:04 EDT
Created attachment 26357 [details]
Proposed fix for 3.1.1

The first fix had some issues.	This patch correctly uses the last segment of
the bundle entry paths to match against the filePattern.
Comment 4 Thomas Watson CLA Friend 2005-08-22 17:23:50 EDT
Pascal, please take a look at the latest patch to the maintenance branch.  I 
already released the new patch to HEAD since the current fix in HEAD was bogus.
Comment 5 Pascal Rapicault CLA Friend 2005-08-22 17:46:45 EDT
Patch reviewed. Good to go.
Comment 6 Thomas Watson CLA Friend 2005-08-22 17:50:07 EDT
Fixed in maintenance branch.