summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/htscore.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/htscore.c b/src/htscore.c
index 578df60..b81b0c6 100644
--- a/src/htscore.c
+++ b/src/htscore.c
@@ -2958,6 +2958,16 @@ static void postprocess_file(httrackp * opt, const char *save, const char *adr,
fopen(fconcat
(OPT_GET_BUFF(opt), StringBuff(opt->path_html), "index.mht"),
"wb");
+ (void) unlink(fconcat(OPT_GET_BUFF(opt), StringBuff(opt->path_html),
+ "index.eml"));
+ if (symlink("index.mht",
+ fconcat(OPT_GET_BUFF(opt), StringBuff(opt->path_html),
+ "index.eml")) != 0) {
+ if (errno != EPERM) {
+ hts_log_print(opt, LOG_WARNING | LOG_ERRNO,
+ "could not create symbolic link from index.mht to index.eml");
+ }
+ }
if (opt->state.mimefp != NULL) {
char BIGSTK rndtmp[1024], currtime[256];