Bugs in merging with *default-pathname-defaults*

Raymond Toy toy.raymond at gmail.com
Tue Jun 8 00:16:57 CEST 2010


Zach Beane has pointed out to me that cmucl doesn't merge the pathname
with *default-pathname-defaults* as required in CLHS 19.2.3.

In particular, OPEN, ENSURE-DIRECTORIES-EXIST, FILE-AUTHOR, and
DELETE-FILE don't merge.  This is now fixed in cvs.

I'm too lazy to make a patch for 20a for this (if you really want one,
speak up!) so I offer the following fix for this issue.

(/fwrappers:define-fwrapper/ force-merge-pathname (filename &rest options)
  (setf <http://www.lispworks.com/reference/HyperSpec/Body/a_setf.htm> filename (merge-pathnames <http://www.lispworks.com/reference/HyperSpec/Body/f_merge_.htm> filename))
  (fwrappers::call-next-function))

(fwrappers:fwrap 'open <http://www.lispworks.com/reference/HyperSpec/Body/f_open.htm> #'force-merge-pathname)
(fwrappers:fwrap 'ensure-directories-exist <http://www.lispworks.com/reference/HyperSpec/Body/f_ensu_1.htm> #'force-merge-pathname)
(fwrappers:fwrap 'file-author #'force-merge-pathname)
(fwrappers:fwrap 'delete-file #'force-merge-pathname)

(This is pretty neat.  I've never used fwrappers before, even though they've been there for years now.)

Ray



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.zs64.net/mailman-archive/cmucl-imp/attachments/20100607/4f83c229/attachment.html>


More information about the cmucl-imp mailing list