The Trunk: Files-mt.220.mcz

[email protected]
Newsgroups gmane.comp.lang.smalltalk.squeak.general
Message-ID <[email protected]>
Marcel Taeumel uploaded a new version of Files to project The Trunk:
http://source.squeak.org/trunk/Files-mt.220.mcz

==================== Summary ====================

Name: Files-mt.220
Author: mt
Time: 18 May 2026, 6:02:57.194064 pm
UUID: 20ebd570-d94f-c84b-bee2-be6f0b8ba1e2
Ancestors: Files-lrnp.219

Fixes regression in FileDirectory >> #exists for Windows platform regarding root directory. Named primitive 'primLookupEntryIn:name' might be adapted (in the VM) in the future to also support this case.

=============== Diff against Files-lrnp.219 ===============

Item was added:
+ ----- Method: DosFileDirectory>>exists (in category 'as yet unclassified') -----
+ exists
+ 	"Overwritten because VM 202604252110 primitive primLookupEntryIn:name: cannot check existence for 'FileDirectory root'  to then attach, e.g., 'C:'. 
+ 	
+ 	FileDirectory root exists.
+ 	FileDirectory default primLookupEntryIn: '' name: '.' -- nil :(
+ 	FileDirectory default primLookupEntryIn: '' index: 1 -- not nil :) ... #(''C:'' 0 0 true 0)
+ 	
+ 	See commentary in #primLookupEntryIn:name.
+ 	
+ 	Canonical example in tests, which must work:
+ 		FileDirectory root directoryEntryFor: 'C:'.
+ 	"
+ 	
+ 	| vmPathName nickname |
+ 	vmPathName := pathName asVmPathName.
+ 	nickname := self class currentDirectoryNickname.
+ 	^ (nickname notNil and: [vmPathName notEmpty])
+ 		ifTrue:
+ 			[ (self primLookupEntryIn: vmPathName name: nickname asVmPathName)
+ 				ifNil: [false]
+ 				ifNotNil: [:entryArray | entryArray ~~ #primFailed
+ 						and: [(entryArray at: 4) "dirFlag"]]]
+ 		ifFalse:
+ 			[(self primLookupEntryIn: vmPathName index: 1) ~~ #badDirectoryPath]!

Squeak-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.