|
From: David T. L. <le...@ma...> - 2002-09-06 21:42:27
|
On Fri, Sep 06, 2002 at 10:31:12AM -0400, David T. Lewis wrote:
>
> On Windows, the image directory is the sensible default location for log
> files, but I expect that it would be possible to pick up the "Start in:"
> path (as displayed in the properties dialog of a desktop icon for running
> Squeak). Presumably that's what you get from a Win32 call to
> GetCurrentDirectory(), right? If so, this would follow the same behavior
> as the Unix implementation, which would in most cases end up being the
> image directory anyhow. If the user wanted the log files to go somewhere
> else, s/he would set the "Start in:" path to the location for the log files,
> and specify an explicit path the the image on the command line ("Target:"
> in the properties dialog).
>
> Hmm, I guess I had better go add the correct #getCwd support for Win32
> into OSProcess, now that I think about it.
OK, I wrote the primitiveGetCurrentWorkingDirectory for Windows, and here
is what I find on a Windows ME system:
1) If I run Squeak from a desktop icon, the cwd is the "Start in:" path
as defined in the properties dialog. Normally, this would be the same as
the image directory.
2) If I run Squeak from a DOS shell, the cwd is that of the DOS shell
(same as would be expected on Unix), independent of the location of the
VM or the image. In practice, the cwd would usually turn out to be the
same as the image directory.
3) If I drag and drop an image file onto a VM in some arbitary directory,
the cwd is C:\WINDOWS.
The first two behaviors are reasonable. The third one is unexpected (at
least to me). Therefore, I think that the right thing to do on Windows
is to assume that the cwd "should be" the same as the image directory,
and put the log files in the image directory. Which of course is what
Andreas just implemented, so this should just serve as confirmation that
it was the right thing to do.
Dave
|