bug-gnulib
[Top][All Lists]
Advanced

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

Re: merge rename and rename-dest-slash


From: Eric Blake
Subject: Re: merge rename and rename-dest-slash
Date: Mon, 07 Sep 2009 15:30:51 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Eric Blake on 9/7/2009 11:12 AM:
> According to Eric Blake on 9/7/2009 10:30 AM:
>> Any objections to deleting the rename-dest-slash module?  It performs a
>> subset of the rename module,
> 
> Correction.  As currently written, rename.m4 checks whether:
> 
> rm -rf d1 d2
> mkdir d1
> rename("d1/","d2")
> 
> Meanwhile, rename-dest-slash.m4 checks whether:
> 
> rm -rf d1 d2
> mkdir d1
> rename("d1","d2/")
> 
> fails

And POSIX 2008 is still awkward on rules for trailing slashes.  I think
the intent is that a directory may be specified with a trailing slash, but
that a regular file must not (so, for example, the fact that Solaris 10
allows:

touch a
rename("a","b/")

to succeed if b exists as a regular file, but fails with ENOTDIR if b does
not exist, is a bug in Solaris).  But I'd rather wait for the Austin group
ruling on my bug report:

https://www.opengroup.org/sophocles/show_mail.tpl?CALLER=index.tpl&source=L&listname=austin-group-l&id=12739

as well as delay the merging of these two modules until after coreutils
7.6 is released.

> 
> I guess it's time for me to add a unit test.

Still true, although it's hard to know what to test until we are certain
what POSIX requires.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkqle4sACgkQ84KuGfSFAYDimACffcikrffznSm+jbGVyNj3/aGA
NAsAoKPuryJSyFQcmkXUqRktC8HEkFGt
=Zg6u
-----END PGP SIGNATURE-----




reply via email to

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