A recent change to FileDirectory>>fileExists: makes the test for a given file case-sensitive. I noticed this when 2.4b couldn't find the sources file even though I had copied one from a working 2.4beta directory. Changing the name to exactly 'SqueakV2.sources' solved that. Since most (all for Squeak?) operating systems are not case-sensitive, it might be nice to retain the old behavior. Code to do so follows.
Cheers, Bob
'From Squeak 2.4b of April 23, 1999 on 30 April 1999 at 12:53:43 am'!
!FileDirectory methodsFor: 'testing' stamp: 'RAA 4/30/1999 00:52'! fileExists: filenameOrPath "Answer true if a file of the given name exists. The given name may be either a full path name or a local file within this directory." "FileDirectory default fileExists: Smalltalk sourcesName"
| fName dir | FileDirectory splitName: filenameOrPath to: [:filePath :name | fName _ name. filePath isEmpty ifTrue: [dir _ self] ifFalse: [dir _ FileDirectory on: filePath]]. fName _ fName asLowercase. ^ (dir fileNames detect: [ :each | each asLowercase = fName ] ifNone: [nil]) notNil ! !
On Fri, 30 Apr 1999, Bob Arning wrote:
A recent change to FileDirectory>>fileExists: makes the test for a given file case-sensitive.
Could this be the reason for "missing" changes as some Windows users reported?
Since most (all for Squeak?) operating systems are not case-sensitive, it might be nice to retain the old behavior.
Only nice for case-insensitive file systems. And no, not all Squeak plattforms ignore case. On such a system, a file reported to exist could not be accessed if the case does not match. If we account for ftp/http file systems, the majority of files accessible from even Win or Mac should be handled with respect to case.
I would treat case-sensitivity as an attribute specific to a file system. That means the descendants of FileDirectory should implement something alike #isCaseSensitive, so that #fileExists: can deal with it properly.
/bert
squeak-dev@lists.squeakfoundation.org