On Thu, Sep 12, 2002 at 08:46:14AM -0700, Ned Konz wrote:
Perhaps something like this:
newName := 'c:\temp\squeak'. Smalltalk saveChangesInFileNamed: (Smalltalk fullNameForChangesNamed: newName); saveImageInFileNamed: (Smalltalk fullNameForImageNamed: newName); snapshot: false andQuit: true.
Hi,
I have been testing this code and I have a questions and observations.
1) I tried to recreate the problem with a win xp pro pc running an image served from a win2k server. After performing a suspend cycle, the drives came back fine. I didn't try harder to get this not to work following this simple test. I don't know whether the xp code is better at power management regarding drives/files etc.
2) More importantly, the files saved ignore the drive and directory specified in the string
printing Smalltalk fullNameForChangesNamed: 'c:\temp\squeak-test' gives 'squeak-test.changes'
looking at the first line of that method newName _ FileDirectory baseNameFor: aName asFileName.
aName asFileName gets evaluated first.
digging deeper
String>>asFileName FileDirectory class>>checkName: self fixErrors: true FileDirectory class>>localNameFor:
This last method strips the path off.
Therefore, I was wondering if SystemDictionary>>fullNameForChangesNamed was intended to allow the path through or whether this is a bug? Is String>>asFileName intended to strip the path off? Apologies if I have I missed something obvious!
This is on Squeak3.2 #4956.
Cheers,
Mike