[squeak-dev] Squeaklets on USB flash
K. K. Subramaniam
subbukk at gmail.com
Fri Jul 4 10:28:22 UTC 2008
Hi,
ProjectLoading saves a copy of all loaded projects in Squeaklets directory
even when the files come from local sources. This is annoying when running
Squeak off a flash memory chip. The attached change set skips this caching
behavior.
This change is rather harsh and will increase loading latency those who
save/load projects off a remote server. I suspect such folks would already
have a proxy caching server. Does anyone have a better idea?
Subbu
-------------- next part --------------
'From etoys3.0 of 24 February 2008 [latest update: #2047] on 4 July 2008 at 3:49:34 pm'!
!ProjectLoading class methodsFor: 'private' stamp: 'kks 7/4/2008 15:33'!
morphOrList: aFileName stream: preStream fromDirectory: aDirectoryOrNil archive: archive
"Answer morphOrList or nil if problem happened"
| projStream localDir morphOrList |
projStream _ archive
ifNil: [preStream]
ifNotNil: [self projectStreamFromArchive: archive].
(self checkSecurity: aFileName preStream: preStream projStream: projStream)
ifFalse: [^nil].
"localDir _ Project squeakletDirectory.
aFileName ifNotNil: [
(aDirectoryOrNil isNil or: [aDirectoryOrNil pathName
~= localDir pathName]) ifTrue: [
localDir deleteFileNamed: aFileName.
(localDir fileNamed: aFileName) binary
nextPutAll: preStream contents;
close.
].
]."
morphOrList _ projStream asUnZippedStream.
preStream sleep. "if ftp, let the connection close"
^ morphOrList
! !
More information about the Squeak-dev
mailing list
|