From: Jordan K. Hubbard Date: Sun, 10 Oct 1993 01:46:53 +0000 (+0000) Subject: Try copy if rename of temporary catpage fails. X-Git-Tag: FreeBSD-release/1.1~1504 X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/commitdiff_plain/fad0144f0cba4efee81f1c9adb3945ce5bea8549?hp=d2ae4d12da9fde6623f330dacaf1b10ca071a3a9 Try copy if rename of temporary catpage fails. --- diff --git a/gnu/usr.bin/man/man/man.c b/gnu/usr.bin/man/man/man.c index a96f2a2af6..c5b4ee0af0 100644 --- a/gnu/usr.bin/man/man/man.c +++ b/gnu/usr.bin/man/man/man.c @@ -1087,7 +1087,12 @@ make_cat_file (path, man_file, cat_file) } else { if (rename(temp, cat_file) == -1) { - perror("rename"); + /* FS might be sticky */ + sprintf(command, "cp %s %s", temp, cat_file); + if (system(command)) + fprintf(stderr, + "\nHmm! Can't seem to rename %s to %s, check permissions on man dir!\n", + temp, cat_file); unlink(temp); return 0; }