[Pkg] The Trunk: Files-bf.88.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Sep 9 10:43:50 UTC 2010

Bert Freudenberg uploaded a new version of Files to project The Trunk:

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

Name: Files-bf.88
Author: bf
Time: 9 September 2010, 12:43:41.62 pm
UUID: 128dbf17-b62e-4aa6-9c50-e8259b7cf5b0
Ancestors: Files-ar.87

Make FileDirectory>>assureExistence work with security sandbox enabled. It does not rely on listing the parent directory's contents anymore, which does not work when sandboxed.

FileDirectory>>assureExistenceOfPath: could be removed, it is unused in trunk. Not sure if 3rd-party code uses it, so I left it in for now. Maybe deprecate?

=============== Diff against Files-ar.87 ===============

Item was changed:
  ----- Method: FileDirectory>>assureExistence (in category 'file directory') -----
  	"Make sure the current directory exists. If necessary, create all parts in between"
+ 	self exists ifFalse: [
+  		self containingDirectory
+ 			assureExistence;
+ 			createDirectory: self localName]!
- 	self containingDirectory assureExistenceOfPath: self localName!

Item was changed:
  ----- Method: FileDirectory>>assureExistenceOfPath: (in category 'file directory') -----
  assureExistenceOfPath: lPath
  	"Make sure the local directory exists. If necessary, create all parts in between"
  	| localPath |
  	localPath := lPath.
  	localPath isEmpty ifTrue: [ ^self ]. "Assumed to exist"
+ 	self assureExistence.
  	(self directoryExists: localPath) ifTrue: [^ self]. "exists"
- 	"otherwise check parent first and then create local dir"
- 	self containingDirectory assureExistenceOfPath: self localName.
  	self createDirectory: localPath!

More information about the Packages mailing list