diff options
author | Xavier Roche <xroche@users.noreply.github.com> | 2013-08-18 09:36:47 +0000 |
---|---|---|
committer | Xavier Roche <xroche@users.noreply.github.com> | 2013-08-18 09:36:47 +0000 |
commit | a5d9076a992a95fe8fae99967d62798165b0e8cb (patch) | |
tree | 20f38b52fa6ef89a58f68fb6dc8473c418d70018 | |
parent | 30455d9d661eedcb4ca5542e5af7a3ae31327cf3 (diff) |
"index.eml" => "index.mht"
-rw-r--r-- | src/htscore.c | 10 |
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]; |