Try copy if rename of temporary catpage fails.

This commit is contained in:
Jordan K. Hubbard 1993-10-10 01:46:53 +00:00
parent 08ac278533
commit f67b5cb1cb
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=566

View File

@ -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;
}