[Ecls-list] Disruptive change in EXT:MKDIR (solved by ENSURE-DIRECT...)

Juan Jose Garcia-Ripoll juanjose.garciaripoll at googlemail.com
Thu Apr 12 23:11:57 UTC 2012


In order to avoid problems with bogus values of *default-pathname-defaults*
(See 18:43:43 @
http://ccl.clozure.com/irc-logs/lisp/2012-04/lisp-2012.04.12.txt), as well
as problems with pathnames that carry name or type components, EXT:MKDIR no
longer accepts pathnames as inputs: only namestrings. And unlike before,
EXT:MKDIR will not expect the user to pass a directory namestring (this
assumption led (si:mkdir "/tmp/foo") not to work, as ECL expected (si:mkdir
"/tmp/foo/"))

If you need to create directories from pathnames, use
ENSURE-DIRECTORIES-EXIST, which now accepts a non-standard argument :MODE,
playing the same role as MKDIR's mode value.

This has also revealed that some code will have to be revised, for it was
written under the assumption that *default-pathname-defaults* has :NAME and
:TYPE --- in other words, when ECL creates a pathname that is a directory,
it will remain so. However, as that IRC log revealed, some people use a
very strange setting for *d-p-d* which broke this expectation.

Finally, ECL now still outputs error messages taken from the C library, but
notifies the user who is to blame for the scarcity of the message:

> (si:mkdir "/" 0)

Condition of type: SIMPLE-ERROR
Could not create directory "/"
C library explanation: Is a directory.

Available restarts:
[...]

Best,

Juanjo

-- 
Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)
http://juanjose.garciaripoll.googlepages.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20120413/b7ab5138/attachment.html>


More information about the ecl-devel mailing list