(dolink): Append complete path ot only filename to ../ list.
authordrepper <drepper>
Sat, 17 Apr 1999 09:39:09 +0000 (09:39 +0000)
committerdrepper <drepper>
Sat, 17 Apr 1999 09:39:09 +0000 (09:39 +0000)
timezone/zic.c

index e37dd73..e5c6761 100644 (file)
@@ -613,13 +613,13 @@ const char * const        tofile;
                        (void) exit(EXIT_FAILURE);
 
                result = link(fromname, toname);
-#if (HAVE_SYMLINK - 0) 
+#if (HAVE_SYMLINK - 0)
                if (result != 0) {
                        char *s = (char *) tofile;
-                       register char * symlinkcontents = NULL;
+                       register char *symlinkcontents = NULL;
                        while ((s = strchr(s+1, '/')) != NULL)
                                symlinkcontents = ecatalloc(symlinkcontents, "../");
-                       symlinkcontents = ecatalloc(symlinkcontents, fromfile);
+                       symlinkcontents = ecatalloc(symlinkcontents, fromname);
 
                        result = symlink(symlinkcontents, toname);
                        if (result == 0)