mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Try copy if rename of temporary catpage fails.
This commit is contained in:
parent
08ac278533
commit
f67b5cb1cb
1 changed files with 6 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue