[Pkg] The Trunk: Files-ul.178.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Mar 5 22:39:37 UTC 2018


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

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

Name: Files-ul.178
Author: ul
Time: 5 March 2018, 10:49:06.063658 pm
UUID: e612d91e-11fb-4479-b754-56fe59e06bec
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) ifNil: [ ^self ].
+ 	#badDirectoryPath == entryArray ifTrue: [
+ 		^(InvalidDirectoryError pathName: fullPath) signal ].
+ 	[
+ 		aBlock value: (DirectoryEntry fromArray: entryArray directory: self) convertFromSystemName.
+ 		entryArray := (self primLookupEntryIn: vmPath index: (index := index + 1)) ifNil: [ ^self ] ] repeat!
- 	[(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 Packages mailing list