[squeak-dev] The Inbox: Files-ul.178.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Feb 5 20:02:04 UTC 2018


Levente Uzonyi uploaded a new version of Files to project The Inbox:
http://source.squeak.org/inbox/Files-ul.178.mcz

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

Name: Files-ul.178
Author: ul
Time: 22 January 2018, 12:27:00.720911 am
UUID: 7b7a5c36-da7a-4404-9dd4-20b21975aa30
Ancestors: Files-tpr.177

- only check once for #badDirectoryPath in FileDirectory>>directoryContentsFor:do:

=============== Diff against Files-tpr.177 ===============

Item was changed:
  ----- Method: FileDirectory>>directoryContentsFor:do: (in category 'private') -----
  directoryContentsFor: fullPath do: aBlock
  	"Do aBlock for the files and directories in the directory with the given path. See primLookupEntryIn:index: for further details."
  	"FileDirectory default directoryContentsFor: '' do: [ :each | Transcript show: each; cr ]"
  
+ 	| vmPath entryArray index |
+ 	vmPath := fullPath asVmPathName.
- 	| f entryArray index |
- 	f := fullPath asVmPathName.
  	index := 1.
+ 	entryArray := self primLookupEntryIn: vmPath index: index.
+ 	#badDirectoryPath == entryArray ifTrue: [
+ 		^(InvalidDirectoryError pathName: fullPath) signal ].
+ 	[
+ 		aBlock value: (DirectoryEntry fromArray: entryArray directory: self) convertFromSystemName.
+ 		(entryArray := self primLookupEntryIn: vmPath index: (index := index + 1)) == nil ] whileFalse!
- 	[(entryArray := self primLookupEntryIn: f index: index) == nil] whileFalse: [
- 		#badDirectoryPath == entryArray ifTrue: [
- 			^(InvalidDirectoryError pathName: pathName) signal].
- 		index := index + 1.
- 		aBlock value: (DirectoryEntry fromArray: entryArray directory: self) convertFromSystemName]!



More information about the Squeak-dev mailing list