CfsPath>>isValidPathName: is buggy

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

CfsPath>>isValidPathName: is buggy

Postby Michael Keppler » Wed Feb 18, 2009 6:04 am

Hi,

I consider CfsPath>>isValidPathName: (or more specifically some of the sub class implementations) to be broken for case insensitive file systems. E.g. on a Windows system with NTFS or FAT file system it will answer
Code: Select all
CfsPath isValidPathName: 'c:\'  --> true
CfsPath isValidPathName: 'C:\'  --> false


I fixed this by replacing the above method with the following code (as there is already a method isCaseSensitive for the different file system implementations):
Code: Select all
isValidPathName: pathName
   "Answer whether @pathName is a valid path name."
   
   | validName |
   
   validName := self defaultSubclass makeValidFormatFrom: pathName.
   ^(validName = pathName) or: [self defaultSubclass isCaseSensitive not and: [validName equalsIgnoringCase: pathName]].


Ciao, Michael
Michael Keppler
 
Posts: 28
Joined: Wed Feb 27, 2008 4:33 am

Re: CfsPath>>isValidPathName: is buggy

Postby wembley » Thu Feb 19, 2009 12:31 pm

Michael -

You are correct -- CfsPath class>>#isValidPathName: is broken on platforms are are not case sensitive. Thank you for bringing this to our attention. I have opened case 39203 for this problem. A fix is planned for V8.0.1.
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