[Top][All Lists]

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

[Chicken-hackers] [PATCH] Remove change-directory and change-directory*

From: Peter Bex
Subject: [Chicken-hackers] [PATCH] Remove change-directory and change-directory*
Date: Sun, 13 Aug 2017 18:40:10 +0200
User-agent: NeoMutt/20170113 (1.7.2)

Hi all,

The attached patch gets rid of change-directory and change-directory*
in favour of using (current-directory) with an argument.  The argument
can either be a string or a file descriptor.  As far as I know we can't
have ports open on directories.  If we can, we'll have to add support for
using current-directory with a port, too, for consistency.

This opens an important question though: Should current-directory return
whatever is passed in, or should it call itself with no arguments to get
the name of the directory we changed into?  Note that this will fail if
we passed in a file descriptor to a directory which was unlinked!  So
even though this is somewhat weird I think just returning whatever was
passed in (if the change succeeded) is probably the best we can do.
Trying to return a normalized pathname if a string is passed in could
be acceptable, but might be too much magic.


Attachment: 0001-Remove-change-directory-in-favour-of-current-directo.patch
Description: Text Data

Attachment: signature.asc
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]