symlink change

SCCS-file: zic.c
SCCS-SID: 7.94
This commit is contained in:
Arthur David Olson
2012-07-18 03:02:29 -04:00
committed by Paul Eggert
parent 7465aa9b58
commit a28987cf3c
+11 -1
View File
@@ -601,9 +601,19 @@ const char * const tofile;
if (!itsdir(toname))
(void) remove(toname);
if (link(fromname, toname) != 0) {
int result;
if (mkdirs(toname) != 0)
(void) exit(EXIT_FAILURE);
if (link(fromname, toname) != 0) {
result = link(fromname, toname);
#if (HAVE_SYMLINK - 0)
if (result != 0) {
result = symlink(fromname, toname);
if (result == 0)
warning(_("hard link failed, symbolic link used"));
}
#endif
if (result != 0) {
const char *e = strerror(errno);
(void) fprintf(stderr,