]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Update from tzcode2002c.
authorUlrich Drepper <drepper@redhat.com>
Sat, 6 Apr 2002 03:49:35 +0000 (03:49 +0000)
committerUlrich Drepper <drepper@redhat.com>
Sat, 6 Apr 2002 03:49:35 +0000 (03:49 +0000)
timezone/zic.c

index 6fdcfcb66a84b45dac70362c6213e854626f94a4..64642b39c596aa047c840d2e6224b5959e56e4c2 100644 (file)
@@ -1,6 +1,6 @@
 #ifndef lint
 #ifndef NOID
-static char    elsieid[] = "@(#)zic.c  7.104";
+static char    elsieid[] = "@(#)zic.c  7.107";
 #endif /* !defined NOID */
 #endif /* !defined lint */
 
@@ -621,9 +621,11 @@ const char * const tofile;
 
                result = link(fromname, toname);
 #if (HAVE_SYMLINK - 0)
-               if (result != 0) {
+               if (result != 0 &&
+                   access(fromname, F_OK) == 0 &&
+                   !itsdir(fromname)) {
                        const char *s = tofile;
-                       register char *symlinkcontents = NULL;
+                       register char * symlinkcontents = NULL;
                        while ((s = strchr(s+1, '/')) != NULL)
                                symlinkcontents = ecatalloc(symlinkcontents, "../");
                        symlinkcontents = ecatalloc(symlinkcontents, fromname);