[squeak-dev] The Trunk: Files-ct.198.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Oct 11 12:30:06 UTC 2022

Christoph Thiede uploaded a new version of Files to project The Trunk:

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

Name: Files-ct.198
Author: ct
Time: 13 September 2022, 2:09:02.615711 pm
UUID: 022ceb10-85c8-fa42-8461-2a09bbacd572
Ancestors: Files-ct.197

Fixes FileDirectory>>#exists for files again, which must answer true for and only for directories. These "false negatives" led to spurious errors (MessageNotUnderstood: DosFileDirectory>>readOnlyStream) on Windows in the recent past when dragging a host system file into the image (see FileDirectory class>>#dropFilesAndDirectories:). This seems to be a regression from Files-eem.195. Note that when given a non-directory path, primitiveDirectoryEntry fails on Linux but answers a valid tuple on Windows.

=============== Diff against Files-ct.197 ===============

Item was changed:
  ----- Method: FileDirectory>>exists (in category 'testing') -----
  	"Answer whether the directory exists"
  	^self class currentDirectoryNickname
  			(self primLookupEntryIn: pathName asVmPathName name: me asVmPathName)
  				ifNil: [false]
+ 				ifNotNil: [:entryArray | entryArray ~~ #primFailed
+ 						and: [(entryArray at: 4) "dirFlag"]]]
- 				ifNotNil: [:maybeErr| maybeErr ~~ #primFailed]]
  			[(self primLookupEntryIn: pathName asVmPathName index: 1) ~~ #badDirectoryPath]!

More information about the Squeak-dev mailing list