[tz] zic fails for soft-links-only target volume

Tom Lane tgl at sss.pgh.pa.us
Fri Nov 4 14:17:00 UTC 2016

Paul Eggert <eggert at cs.ucla.edu> writes:
> Tom Lane wrote:
>> With that, all the symlinks seem to point somewhere valid.

> Thanks, I wrote the same patch while thinking about your earlier email, and 
> installed the attached.

Thanks, I can confirm that the original portability problem is fixed: zic
seems to install a valid set of symlinks when its hard-link attempts fail,
according to both my testing and that of my original complainant.

However, I'm still dubious about the error handling in mkdirs(),
specifically I think you should do this:

-			if (err != EEXIST && !itsdir(name)) {
+			if (err != EEXIST || !itsdir(name)) {

I see that you modified the function's header comment to acknowledge that
it doesn't consider a collision with a non-directory to be an error, but
that doesn't make any sense to me.  All the call sites would prefer the
invariant to be "on return, there is a directory there"; they are all
going to fail if there isn't.

			regards, tom lane

More information about the tz mailing list