[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Undesired behaviour of current-directory parameter



Greetings,

MzScheme 103.5 (+ some hopefully unrelated local bugfixes) on
Windows 2000:

It seems that current-directory parameter works so that setting the
parameter doesn't actually change process' current directory
immediately but it is changed when one, for example, runs an
external application.  At least the externally observable behaviour
indicates that.  This seems to fall apart in the following
situation:

(define temp-dir "some-directory-that-does-not-exist-yet")
(make-directory temp-dir)
(parameterize ((current-directory temp-dir))
  (system* ...))
(delete-directory temp-dir)

What happens is that delete-directory fails because mzscheme
process is using the directory that is being deleted.

Workaround was to add (system "exit") before the delete-directory
call :-)

Perhaps delete-directory should be modified to set process' current
directory from the corresponding parameter or the whole method
should be changed so that the current directory of the process is
changed immediately when the parameter is set?

-- 
Hannu
Please don't send copies of list mail