UNIX CfsDirectoryDescriptor error

VA Smalltalk is a "100% VisualAge compatible" IDE that includes the original VisualAge technology and the popular VA Assist and WidgetKit add-ons.

Moderators: Eric Clayberg, wembley, tc, Diane Engles, solveig

UNIX CfsDirectoryDescriptor error

Postby daswartz » Fri Feb 29, 2008 3:26 pm

When you pass in a file name pattern to a CfsDirectoryDescriptor under any of the UNIX variants (we run on Solaris), it does not always correctly filter the file names. For instance:

I have a directory /tmp/test/. In that directory is one file named: abc.txt.123.txt

The code:

| entry dir |
dir := CfsDirectoryDescriptor
opendir: '/tmp/test/'
pattern: '*.txt'
mode: CfsConstants::FREG.
entry := dir readdir

will return nil. The code does not consider the abc.txt.123.txt file name to match the pattern *.txt.

The problem is either in CfsDirectoryDescriptor>>basicReaddir:for: in how it uses EsString>>indexOf:matchCase:startingAt:, or in the implementation of EsString>>indexOf:matchCase:startingAt:. Which one is wrong depends on what EsString>>indexOf:matchCase:startingAt: is actually supposed to do.

This problem does not occur on Windows, because, on that platform, the OS does the pattern matching.

This error is present in all versions up through 7.0. We have not upgraded to 7.5

thank you,
Doug Swartz
daswartz
 
Posts: 48
Joined: Sat Oct 21, 2006 8:12 am
Location: Omaha, USA

Re: UNIX CfsDirectoryDescriptor error

Postby wembley » Mon Mar 03, 2008 9:58 am

Doug -

I have verified this problem on Ubuntu 7.10. I opened Case 34296 for it and will let you know when we have a fix.
John O'Keefe [|], Principal Smalltalk Architect, Instantiations Inc.
wembley
Moderator
 
Posts: 405
Joined: Mon Oct 16, 2006 3:01 am
Location: Durham, NC


Return to VA Smalltalk 7.0, 7.5 & 8.0

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest